Shopify theme app extension tutorial (2026): put your app on the storefront the way Shopify wants it – an app block for the product page and an app embed for every page, plus deep links that open the theme editor with your block already added. Our app then checks which themes have them. Shopify app development series, episode 18 – the series finale. Everything shown is real, nothing skipped.
What you'll learn
- shopify app generate extension (theme_app_extension)
- An app block: liquid + schema, target section, settings, live stock
- An app embed: target body
- Deep links: addAppBlockId + activateAppId
- Find your blocks in product.json + settings_data.json
- shopify app dev with a storefront password + –theme
💻 Free source code for this episode: github.com/fayyaz315/shopify-app-development-2026/tree/ep18
Chapters
- 0:00 Preview + intro
- 0:37 How it works
- 1:09 Generate the extension
- 1:44 The app block
- 2:58 The app embed
- 3:15 The Storefront page
- 4:05 Deep link: add the block
- 5:01 Deep link: switch on the embed
- 5:40 On the storefront
- 6:01 In GraphiQL
- 6:18 Honest notes
- 6:59 Recap
Step by step (full walkthrough)
Preview + intro
In this final episode, our app puts its own block on a Shopify store, without touching a single line of the theme. One click opens the theme editor with the block already added, and our app can tell which themes have it. This is a Shopify theme app extension, from our own app, live on a store's product page.
The theme's code was never edited. This is episode eighteen, the last episode of the Shopify app development series. Last time we found out that apps can't edit themes.
Today: the way Shopify wants it. The full code is free on GitHub, and the link is in the description.
How it works
Here's the idea. Your app ships an extension. The extension holds blocks.
The merchant decides where they go. An app block sits inside a section, like the product page. It only works where the section accepts at app blocks, which we checked last episode.
An app embed goes on every page, like a chat button or a bar. It doesn't need an at app section at all. Either way, Shopify renders your liquid.
You never write into the merchant's theme files.
Generate the extension
One command creates it: shopify app generate extension, template theme app extension. The extension's own config is tiny: a name, type theme, and a u i d the CLI generates. Don't change that u i d.
You get a folder under extensions, with blocks, assets and locales. Shopify's sample was a star rating. I deleted it and wrote two blocks of our own.
A gotcha: with a theme extension, shopify app dev asks for your storefront password. Pass store password, and theme, for the theme to preview.
The app block
Block one: the product badge. It's plain liquid. A pill with the merchant's text and colours.
Block shopify attributes lets the theme editor select it, so always include it. The text goes through the escape filter, so whatever the merchant types is shown as text, never run as HTML. And it reads live data.
If the stock our app manages from episode five gets low, it adds: only so many left. Three checks: Shopify tracks this product's stock, there's at least one left, and it's at or below the merchant's limit. The schema turns it into a block.
Target section, only on product templates, its stylesheet, and the settings the merchant can change. Enabled on, templates, product: the editor only offers this block on product pages, where a stock line makes sense. The stylesheet comes from the extension's assets folder, and Shopify loads it together with the block.
Text, background, text colour, show low stock, and the low stock limit, from one to fifty. I tested it in the theme editor: with the limit at twenty, the pants, seventeen in stock, showed only seventeen left.
The app embed
Block two: the announcement bar. Same idea, but target body. That one word makes it an app embed.
Its settings: the text, top or bottom, and two colours. Its CSS pins it to the top or bottom of the screen, above the theme, so it looks the same on any theme.
The Storefront page
Now our app. The new Storefront page lists every theme, and whether it has our badge and our bar. The Horizon copies show added and on: that's where I tested before recording.
Today we use Savor, still clean. How does the app know? It reads two theme files.
The product template for the block. Our blocks show up with a type that starts with shopify apps, then the block's handle. And settings data for the embed, where disabled tells us whether the merchant switched it off.
So the bar has three states: not added, off, or on. The badge has two: added or not. Both files, for all nine themes, in one request, with the GraphQL aliases from last episode.
Reading themes needs no exemption.
Deep link: add the block
Add badge, for Savor. That button is a deep link. The theme editor URL, with the product template, add app block i d, and target main section.
The i d is our app's API key, a slash, and the block's file name. Our app runs in an iframe inside the admin, so the button opens the link in the top window, not inside our app. The theme editor opens, and there's our product badge, already added to Savor's product page.
The editor takes a while to load, so I sped that up. Nothing is saved yet. The merchant decides.
Save. Changes saved. Back in our app: Savor, product badge, added.
A good place for these buttons: your app's onboarding. Step one, add the badge. Step two, switch on the bar.
Coming up: the embed, and then the real storefront.
Deep link: switch on the embed
Now turn on bar. This deep link opens the app embeds panel with activate app i d. Same pattern: context apps, and activate app i d, with our key and the embed's handle.
There it is, announcement bar, switched on, with its settings: text, position and colours. Save. And our app agrees: Savor, badge added, bar on.
One thing was missing for the storefront: none of the store's products were on the online store channel. So I added the write publications scope, and published one product with publishable publish.
On the storefront
The real storefront, previewing Savor. Everyday crew neck tee, the product I published with publishable publish, since none were on the online store. And under it, our badge.
Free shipping over $50. Forty eight in stock, above our limit, so no low stock line. Correct.
In GraphiQL
One last look in GraphiQL. Our app's handle and API key: the two parts of every block type and deep link. And Savor's product template, as text.
Our block sits in it now, with its type and its settings, written by the theme editor, not by us.
Honest notes
A few honest notes. One: in dev, the blocks come from shopify app dev. For real stores you run shopify app deploy to release the extension.
Two: a theme saved in the editor can't be undone through the API. That's why I used fresh theme copies for testing. Three: in my recorded take, changing a setting before saving lost the block, so the video saves first.
The test with the setting worked. And everything you saw ran on my real development store, on API version 2026-10. Want to practise?
Add a setting that shows a product metafield in the badge, like the fabric from episode seven.
Recap
So, the recap. Generate a theme app extension. Write blocks in liquid, with a schema: target section for an app block, target body for an app embed.
Send merchants a deep link that adds the block, or switches on the embed. And read product.json and settings data to see where your blocks are. And that's the end of the series.
Eighteen episodes: from creating the app, through products, orders, webhooks and themes, to the storefront. Every episode is in the playlist, and the full code is free on GitHub. The links are in the description.
Thank you for building along with me. Now go build your own Shopify app.
Quick fixes from this episode (60-second Shorts)
Shopify Theme App Extension: Add Your App Block to Any Product Page
How to add an app block in Shopify (2026-10): a theme app extension holds liquid blocks with a schema – target section puts it inside a section like the product page, target body makes it an app embed. The merchant adds it in the theme editor; your app never edits theme code.
Shopify App Block Deep Link: Add Your Block in One Click
Shopify app block deep link (2026-10): send the merchant to /themes/‹id›/editor?template=product&addAppBlockId=‹api_key›/‹handle›&target=mainSection and the theme editor opens with your block already added – they just click Save. For app embeds: context=apps&activateAppId=‹api_key›/‹handle›.
Shopify App Embed Blocks: Check Which Themes Use Your App
Shopify app embed blocks (2026-10): your app can see where its blocks are – app blocks show up in templates/product.json as type shopify://apps/‹app›/blocks/‹handle›/…, app embeds in config/settings_data.json with a disabled flag. One GraphQL request reads both files for every theme.
The Shopify App Development 2026 series
All episodes are free, with the code on GitHub. Course page: Shopify App Development 2026.
- Episode 1: How to Create a Shopify App in 2026 (Shopify CLI Step by Step for Beginners)
- Episode 2: Shopify Admin API Tutorial 2026
- Episode 3: Shopify Product Variants API 2026
- Episode 4: Shopify GraphQL Create Collection 2026
- Episode 5: Shopify Update Inventory API 2026
- Episode 6: Shopify Create Discount Code API 2026
- Episode 7: Shopify Metafields API 2026
- Episode 8: Shopify Metaobjects API 2026
- Episode 9: Shopify App Webhooks 2026
- Episode 10: Shopify File Upload API 2026
- Episode 11: Shopify Page API 2026
- Episode 12: Shopify Translation API 2026
- Episode 13: Shopify Shipping Profiles API 2026
- Episode 14: Shopify Customer API 2026
- Episode 15: Shopify Draft Order API 2026
- Episode 16: Shopify Fulfillment Order API 2026
- Episode 17: Shopify Theme API 2026
- Episode 18: Shopify Theme App Extension Tutorial 2026 (this episode)
🔔 New episodes every week on the YouTube channel. Need a custom Shopify app or API integration? Wixob Technologies builds them: info@wixob.com.