How to add widget JS code on respective shopify store on button click

We have created an embedded shopify app. On installation of that app, we are showing the activate button. On click of that activate button, we wanted to add widget code (JavaScript Code Snippet) on respective app store theme, so that our chat app will be visible on that respective app store. What steps do I need to follow? Is there any documentation available for this?

Hi,

These posts will help you out How to Add Code From Your App to a Client’s Theme and ScriptTag