You can install app code automatically on your theme.
You just need to go to Settings => Install On Theme
Select your theme from the dropdown and hit the “Install Snippets” button.
NOTE: Make sure you will get the backup of your theme before installing the code on your theme automatically.
We tested it with the free themes of Shopify listed below.