How to add an AI chatbot to Shopify

You add an AI chatbot to Shopify by pasting a script tag into your theme's theme.liquid file, just before the closing body tag. It takes about two minutes, needs no app install, and survives theme updates as long as you don't switch themes entirely.

Where it goes

Online Store → Themes → Edit code → layout/theme.liquid

Availability: All Shopify plans. Checkout pages are locked on every plan except Shopify Plus, so the widget will not appear during checkout — see the notes.

Adding the chatbot to Shopify

  1. 1

    In Shopify admin, go to Online Store → Themes.

  2. 2

    On your current theme, click the three-dot menu and choose Edit code.

  3. 3

    In the Layout folder, open theme.liquid.

  4. 4

    Scroll to the bottom and find the closing </body> tag.

  5. 5

    Paste your RubyRep snippet on the line directly above </body>.

  6. 6

    Click Save, then load your storefront — the launcher appears bottom-right.

The snippet you paste

<script src="https://rubyrep.com/rubyrep.js" data-rubyrep="rr_your_public_key" defer></script>

Your own key replaces rr_your_public_key — you get it after training RubyRep on your site.

Worth knowing on Shopify

  • Duplicate your theme before editing if you are nervous. Shopify keeps the copy separate, so you can roll back in one click.

  • The widget will not show on checkout pages unless you are on Shopify Plus. Checkout is a locked surface — this is a Shopify restriction, not a RubyRep one.

  • Switching themes does not carry the snippet across. Re-paste it into the new theme's theme.liquid.

  • If you use a page builder that renders its own layout, add the snippet in the builder's custom-code area instead.

Shopify questions

Do I need a Shopify app?
No. An app is a heavier install with its own permissions and review process; a script tag does the same job in less time and with less access to your store.
Will it slow down my store?
The script is small and loads with `defer`, and the chat interface itself only loads when a shopper opens it. Nothing sits on the critical rendering path.
Can it answer questions about a specific order?
No. RubyRep answers from your published pages — shipping, returns, sizing, product detail. Anything tied to a customer's order number goes to your team through the contact options you configure.
Will it know my product catalogue?
It learns whatever is on your product pages: descriptions, specs, materials, care instructions. If a detail only exists in a product image, it will not be readable.

Related

Get your snippet.

Enter your Shopify site and RubyRep reads it, builds your representative, and hands you the exact line to paste.

https://

Takes about a minute. No credit card.

Using something else? See all platforms.