---
title: "Embed to Shopify stores"
url: "https://help.magicblocks.ai/en/article/embed-your-ai-agent-on-shopify"
language: "en"
last_updated: "2026-03-18T08:19:59.279Z"
---

# Embed to Shopify stores

Want to supercharge your Shopify store with an AI Agent that works 24/7, qualifying contacts, answering questions, and booking meetings automatically?

Here’s how to embed your MagicBlocks Agent on Shopify in just a few steps.

## **What You’ll Need Before You Start**

Before we jump in, make sure you have everything ready:

-   A **published** AI Agent built in MagicBlocks
-   Your **MagicBlocks Embed Code** (here’s the step-by-step on how to get the code ([Embedding](https://help.magicblocks.ai/en/article/embedding-your-ai-agent-to-a-website)).
-   Admin access to your Shopify dashboard

## **Step-by-Step: How to Embed Your AI Agent on Shopify**

### **1\. Copy the Embed Code from MagicBlocks**

Start in your MagicBlocks dashboard:

1.  Go to **Agents**
2.  Select the Agent you want to go live with
3.  Navigate to the **Go Live**
4.  **Copy** the code to Embed.![1](https://export.supademo.com/renders/4dl0u0b2pv/out.png)

This is the script you’ll paste into Shopify to activate the Agent on your site.

### **2\. Log in to Your Shopify Dashboard**

Visit [shopify.com](http://shopify.com/) and sign in to your store’s admin panel.

### **3\. Go to “Online Store” in the Sidebar**

In your Shopify dashboard:

1.  Click **Online Store** under the “Sales Channels” section
2.  This will open your theme editor and customization panel.![2](https://export.supademo.com/renders/4193fz4wdz/out.png)

### **4\. Click the 3 Dots Beside “Customize”**

1.  Under **Themes**, locate your active theme.
2.  Click the **three dots (⋯)** next to the **Customize** button
3.  Choose **“Edit Code”**![3](https://export.supademo.com/renders/c9tv4dc0vg/out.png)![4](https://export.supademo.com/renders/unykdz68zv/out.png)

### **5\. Locate & Open “theme.liquid”**

1.  In the code editor, search for and click on **theme.liquid** under the **Layout** folder.
2.  This is your main theme file, and the right place to insert global scripts like your AI Agent.![5](https://export.supademo.com/renders/gks3tfvxhq/out.png)

### **6\. Paste the Embed Code Before </head>**

Scroll all the way to the bottom of theme.liquid and:

Paste the embed script **just before** the closing </head> tag![6](https://export.supademo.com/renders/qn7s6zrjzl/out.png)

### **7\. Click “Save” & “Preview Store”**

Hit **Save** in the top-right corner of the editor to apply your changes.    
After saving, click **Preview Store** to view your live site.![7](https://export.supademo.com/renders/8963m50ikc/out.png)![8](https://export.supademo.com/renders/yyoil0jjaf/out.png)

###   
**Your AI Agent is Live! 🎉**

Visit your website and you’ll see the MagicBlocks chat icon in the bottom right of your website.![9](https://export.supademo.com/renders/p6unbdrkbz/out.png)

### **Start Chatting & Testing**

Click on the chat icon and test your contact capture flow. Make sure your Agent responds correctly and matches your tone, brand, and objectives.
