CodeeoInsightsE-Commerce

Shopify Theme App Extension Setup: A Step by Step Guide

How to set up a Shopify theme app extension with Shopify CLI: app blocks vs app embeds, generating, previewing, testing, onboarding and releasing.

To set up a Shopify theme app extension, you generate the extension inside your app with Shopify CLI, preview it on a development store with the dev command, test its app blocks and app embeds in the theme editor, add onboarding instructions for merchants, and then deploy and release a new app version. The extension lets your app add features to a merchant's theme without anyone editing theme code.

This guide explains what theme app extensions are, when to use them, and each setup step, based on Shopify's developer documentation as checked in 2026.

What a theme app extension is

A theme app extension is the part of a Shopify app that puts content into the storefront. Product reviews, ratings, size charts, trust badges, chat launchers, countdown timers and 3D product viewers are all typical examples. Instead of the app editing the merchant's Liquid files, the extension provides blocks that the merchant adds and configures in the theme editor.

According to Shopify's overview, an extension is made of:

  • Blocks: Liquid files that act as the places where your app's content appears
  • Assets: CSS, JavaScript and images, which Shopify hosts on its CDN
  • Snippets: reusable Liquid pieces shared between blocks

App blocks and app embed blocks

There are two kinds of block, and choosing the right one is the first design decision.

Block typeWhat it doesGood for
App blockMerchant places it inside a section, where it appears inline with the page contentReviews under a product, a size chart, a badge near the price
App embed blockMerchant switches it on in theme settings; it loads across the store, often as a floating or hidden elementChat widgets, tracking scripts, popups, cookie banners

App blocks need an Online Store 2.0 theme that uses JSON templates and supports app blocks. Shopify's own free themes are built this way.

Why use a theme app extension instead of editing theme code

Older Shopify apps often injected code straight into a theme's files. That approach caused problems: uninstalling the app left code behind, theme updates overwrote changes, and support teams spent hours fixing broken layouts. Theme app extensions avoid this.

  • No theme code edits: merchants add and remove your blocks visually, so there is far less risk of breaking their store.
  • One update for every store: when you deploy a new version, every store using the app gets it, with versioning to track changes.
  • Works across themes: one set of blocks and instructions covers any compatible theme.
  • Clean uninstall: when the merchant removes the app, its blocks go with it.

Before you start

You will need:

  • A Shopify Partner account and a development store
  • An app created with Shopify CLI, or an existing app linked to the CLI
  • A current version of Node.js and Shopify CLI installed
  • Google Chrome, because the dev preview works only in Chrome

It also helps to know which kind of block you need and where in the store it should appear. Write that down first: which templates, which sections and which settings the merchant should be able to change.

Shopify Theme App Extension Setup: A Step by Step Guide: the main points, a Codeeo diagram
The main points of this guide at a glance.

Shopify theme app extension setup, step by step

Step 1: Generate the extension

  1. Open a terminal in your app's root folder.
  2. Run shopify app generate extension (or the matching npm, Yarn or pnpm script in your project).
  3. Choose Theme app extension as the extension type.
  4. Enter a name for the extension.

The CLI creates a new folder under extensions with a working example that displays product ratings. The example reads a product metafield, so create a metafield definition in your development store with these properties: area Products, namespace demo, key avg_rating, type Integer. Then set a value on at least one product so the block has something to show.

Step 2: Preview the extension

  1. From the app folder, run shopify app dev.
  2. The CLI builds the app and its extensions and starts a local development server with hot reloading. On the first run it walks you through some configuration questions; later runs skip the ones already answered.
  3. Follow the CLI output to open the host theme in the theme editor, add your app block and save.
  4. Open the preview URL shown in the CLI output.

You can tell the dev command which theme to use with its theme flag and a theme ID or name. If you do not, the CLI uploads Dawn, Shopify's example theme, to the development store and uses that.

Step 3: Validate and test

Running shopify app build runs Theme Check against the extension, which catches Liquid errors and common mistakes before you deploy. Then test by hand in the theme editor on an Online Store 2.0 theme:

  • Add each app block to the templates where it should work, and switch on each app embed block.
  • Check that the merchant can add, remove, move and configure every block.
  • Make sure floating embeds do not cover page content, menus or checkout buttons, especially on mobile.
  • Test with metafields empty, partly filled and full, because real stores will have all three.
  • Check page speed. Keep JavaScript small and load it only where the block appears.

Step 4: Write onboarding instructions

Merchants need to know what to do after installing your app. Explain which block to add, which template it belongs on, how to switch on the app embed and which settings matter. Many apps link from their admin screen straight to the theme editor with the right template open, which removes most of the guesswork.

Step 5: Deploy and release

  1. From the app folder, run shopify app deploy.
  2. Optionally add a version name and a message with the version and message flags, so your team can see what changed.
  3. By default, deploying creates and releases a new app version. If you want to create the version without releasing it, use the no release flag and release it later with the CLI release command or from the Dev Dashboard.

An app version is a snapshot of your app's configuration and all its extensions. Releasing it replaces the active version for every store that has the app installed, so it can take a few minutes for all stores to receive the update. Test on a development store first, every time.

Shopify Theme App Extension Setup: A Step by Step Guide: further points, a Codeeo diagram
A short summary of the points covered further down.

Common mistakes

  • Using an app embed when an app block would do. Embeds load everywhere. If the feature belongs on product pages only, an app block keeps other pages lighter.
  • Hard coding text. Use block settings and locale files so merchants can change wording and translate it.
  • Heavy scripts. Large JavaScript bundles slow down every page the block touches. Measure before and after.
  • Ignoring empty states. A ratings block on a product with no ratings should show nothing or a sensible message, not an error.
  • Skipping vintage theme stores. Some merchants still run older themes without app block support. Decide how your app will serve them, or say clearly which themes you support.

Choosing ready made extensions as a merchant

If you run a store rather than build apps, theme app extensions are what you install whenever an app adds blocks to your theme. When comparing apps in the Shopify App Store, check that the app supports your theme, read recent reviews about support, try the free trial on a duplicate theme first and watch your page speed after installing. Every extra app adds some weight, so remove the ones you no longer use.

Codeeo builds custom Shopify apps, theme extensions and integrations for merchants who need more than an off the shelf app. Our Shopify developers can design the blocks, keep them fast and handle the release process, and our headless commerce team works on stores that have outgrown themes altogether. If your store already feels slow after adding apps, a speed optimization review or a codebase review is a practical place to start.

Frequently asked questions

It is the part of a Shopify app that adds content to a merchant's online store theme, such as reviews, badges, size charts or chat widgets.

It provides app blocks and app embed blocks that merchants add and configure in the theme editor, so the app never has to edit theme files directly and removing the app leaves no stray code behind.

Tell us what the business needs. We will tell you what to build first.

Schedule a free consultation and get a written recommendation, with costs, before you commit to anything.

Get in touch

PROVEN RESULTS

4.7 / 5verified reviews on Google