Shopify chatbot

Add an AI Chatbot to Your Shopify Store

To add an AI chatbot to Shopify, create a free Ethora agent, copy its one-line script and paste it into your theme's theme.liquid file, just above the closing body tag. Setup takes about 15 minutes. The chatbot answers shoppers from your store's public pages, such as product and policy pages, and from documents you upload.

Start free
Free Ethora plan, no credit card About 15 minutes One line in theme.liquid
Ethora admin panel, AI Widget settings: the one-line script to copy for your website, next to a live preview of the chat widget

AI chatbot for your website Shopify

What you need to add an AI chatbot for Shopify

This guide belongs to the AI chatbot for your website page, which covers what the widget does and how it looks. Here we cover one thing: where its code goes on Shopify.

  • An Ethora account on the free plan: $0, no credit card, 1,000 monthly active users and all chat and AI features.
  • The address of your Shopify store, plus any PDF or other documents you want the chatbot to answer from.
  • A Shopify store with a theme whose code you can edit. Shopify says a trial version of a paid theme has to be purchased before its code can be changed, and that the Starter plan is limited to its own theme and basic theme editor options.
  • A backup copy of the theme. Shopify recommends duplicating your theme before you edit its code.
  • About 15 minutes. No coding: you copy one line and paste it.

You add the widget with one line in the theme code, so there is nothing to install from the Shopify App Store and no app embed to switch on. The widget is added with custom code, in your theme's layout file.

Step by step

Add the chatbot in five steps

Steps 1 to 3 happen in the Ethora admin panel, step 4 in Shopify, and step 5 on your live site.

  1. Sign up free and create an agent

    Create an Ethora account on the free plan: $0, no credit card. In the admin panel, create your agent from a template and give it a name, a greeting and a few lines of instructions. The no-code AI agent builder walks you through it.

  2. Add your content and test it

    Enter the address of your Shopify store and Ethora crawls its pages, then crawls them again on a schedule. Upload PDF and other documents for anything the pages do not cover. Ask real questions in the test chat, which shows the sources behind each answer.

  3. Copy the one-line script

    In the Ethora admin panel, open your app's AI Widget settings. Under Website widget, the Code tab shows the script with your app ID filled in. Copy it from there.

  4. Paste it into theme.liquid

    From your Shopify admin go to Online Store, click the ... button and choose Edit code. Open theme.liquid in the layout folder, paste the script on the line above the closing </body> tag and click Save. Full steps below.

  5. Publish and check

    Open your storefront in a private or incognito window and look for the chat launcher in the corner. Ask it about a product or your returns policy. To change the theme, colours, launcher or position, use the Ethora admin: it has seven themes and a live preview, and saved changes reach your site within about a minute without pasting the code again.

Where to paste the chatbot code in Shopify

Every Shopify theme has a layout file called theme.liquid, which all pages except checkout are rendered through. One line there puts the chatbot on the whole storefront.

layout/theme.liquid
<script
  src="https://widget.chat.ethora.com/assistant.js"
  data-app-id="YOUR_APP_ID"
></script>
</body>

This is a short example with a placeholder. Copy the exact code from your admin panel: in AI Widget settings it comes with your own app ID in place of YOUR_APP_ID, and it may carry more attributes than the example. Paste it as it is.

  1. From your Shopify admin, go to Online Store.
  2. Duplicate your theme first, so that you have a backup copy. Shopify recommends this before any code edit.
  3. Click the ... button, then Edit code.
  4. In the code editor's file list, open the layout folder and select theme.liquid.
  5. Find the closing </body> tag near the end of the file. To search within the file, press Command + F on a Mac or Ctrl + F on Windows.
  6. Paste the Ethora script on its own line, directly above </body>.
  7. Click Save.

Leave the rest of the file as it is. Shopify requires theme.liquid to keep its content_for_header and content_for_layout references, and will not save the file without them.

Source for these steps: Shopify Help Center, "Editing theme code", checked in December 2026. Menus change: if a label on your screen differs, follow the current version of that article.

Troubleshooting

Widget not showing on Shopify? Check these

Go through them in order, from the most basic cause down.

Your plan or theme does not allow code edits

Shopify says you can edit a theme's code only after you have purchased it, so a trial version of a paid theme will not do. It also says that customization options beyond the basics are not available on the Starter plan.

You edited a theme that is not the live one

Each theme has its own theme.liquid. If the script went into a duplicate or another theme in your library, the published storefront does not have it. Open Edit code on the published theme and paste it there.

The script is in a section or template file

A section or template file is only used on some pages. For every page of the storefront, the script belongs in theme.liquid in the layout folder, above the closing body tag.

A theme update or theme change removed it

Shopify warns that code changes which are incompatible with a theme update are removed in the updated copy. After a theme update, or after switching themes, check that the line is still in theme.liquid.

The store is in private mode

While private mode is on, visitors see a landing page that asks for the store password instead of the store. Enter the password and check the widget on the storefront itself.

A cached copy of the page

Your browser may still show the page as it was before you saved. Reload it with a hard refresh, or try a private window or another device.

Good to know

Shopify specifics

What the chatbot does on a store, and where its limits are.

What the chatbot knows about your store

Ethora crawls the public pages of your store, such as product pages and your shipping and returns policies, and crawls them again on a schedule. It answers from those pages and from the documents you upload. It works from that content rather than from the Shopify API, so questions about a specific order or cart are for a person: your team can join the same conversation.

Checkout

theme.liquid is the layout for all pages except checkout, so the chat launcher appears on the storefront and not during checkout.

Custom Liquid sections

Shopify's help centre notes that some themes include a Custom Liquid section, where code can be added in the theme editor without editing theme files. This guide uses theme.liquid because one paste there covers the whole storefront.

Enquiries and handover

Flows add short conversations with buttons to the chat, from templates such as Lead capture, Appointment request and Feedback survey. Conversations are listed in the Ethora admin, and a person can join the same conversation.

No clash with your theme

The script loads asynchronously, and the widget's styles are isolated in a Shadow DOM, so it does not clash with your theme's CSS. Its look is set in the Ethora admin: seven themes, colours, launcher and position, with a live preview.

AI chatbot for Shopify: FAQ

Is there an Ethora app in the Shopify App Store?

No. You add the widget with one line in the theme code, so there is nothing to install from the Shopify App Store. You add the chatbot by pasting one line into theme.liquid in your theme's code editor.

Can the chatbot look up orders or add products to the cart?

No. It answers from your store's public pages and the documents you upload. Order and cart lookups can be connected through the REST API and tool calling, which usually needs a developer. For questions about a specific order, a person from your team can join the same conversation.

How does the chatbot learn my products and policies?

You enter your store address and Ethora crawls its public pages, including product and policy pages, then crawls them again on a schedule. You can also upload PDF and other documents, such as a size guide. The test chat shows the sources behind each answer. More on the RAG chatbot page.

Does it work with any Shopify theme?

The script goes into theme.liquid, the default layout file that Shopify requires every theme to include. You need a theme whose code you can edit: Shopify says a trial version of a paid theme has to be purchased first.

Will a theme update remove the chatbot?

It can. Shopify warns that code changes which are incompatible with a theme update are removed in the updated copy, and a different theme has its own theme.liquid. After an update or a theme change, check for the line and paste it again if it is gone. Your agent and its settings stay in your Ethora account.

Is a chatbot for Shopify free with Ethora?

The Ethora side can be. The free plan is $0 with no credit card, 1,000 monthly active users and all chat and AI features. See pricing. Your Shopify plan is billed by Shopify as usual.

Start free

Put an AI chatbot on your Shopify store today

Free plan, no credit card, about 15 minutes to set up. If you would rather talk it through first, book a short call with our team.

Start free
No code needed Answers from your own pages A person can join any conversation