> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yourhomie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopware

> Add the homie AI chat widget to your Shopware storefront via your theme template or a CMS block.

You can add homie AI to Shopware by placing the embed script in your storefront so it loads on every page. Add it once to your theme layout, or insert it through a CMS (Shopping Experiences) HTML block.

<Note>
  Before you start, make sure you have:

  * An assistant created on the platform
  * Your embed script copied from the assistant's **Publish** area
  * Access to your Shopware theme files or the CMS editor
</Note>

## Add the script to your storefront

<Steps>
  <Step title="Copy your embed script">
    Open your assistant on the platform, go to its **Publish** area, and copy the script. It already contains your `chatbotId`.

    <Frame>
      <img src="https://mintcdn.com/homieai/t1ZSM74lXOpzsQLS/images/integrations/connect.png?fit=max&auto=format&n=t1ZSM74lXOpzsQLS&q=85&s=ddc2630812f2d8706ba54bc3b19cb1a3" alt="Platform Publish area showing the copyable script snippet" width="1340" height="978" data-path="images/integrations/connect.png" />
    </Frame>
  </Step>

  <Step title="Open your storefront layout template">
    In your theme (or a custom theme that extends the storefront), open the base layout template — typically `Resources/views/storefront/base.html.twig`. Override it in your own theme rather than editing the core template directly.
  </Step>

  <Step title="Paste before the closing body tag">
    Add the script just before the closing `</body>` tag, inside a Twig block so it renders on every storefront page:

    ```twig base.html.twig theme={null}
    {% block base_body_script %}
        {{ parent() }}
        <script
          src="https://cdn.yourhomie.ai/embed.min.js"
          chatbotId="YOUR-CHATBOT-ID"
          defer
        ></script>
    {% endblock %}
    ```
  </Step>

  <Step title="Clear the cache and rebuild">
    Clear the Shopware cache and rebuild the storefront so your template change takes effect.
  </Step>
</Steps>

<Tip>
  Prefer not to edit theme files? In the **Shopping Experiences** editor you can add an **HTML** element to a layout assigned to all pages and paste the same script there.
</Tip>

<Check>
  Refresh your storefront. The homie chat bubble appears in the bottom-right corner. Open it and send a test message.
</Check>

## Troubleshooting

* **No bubble showing?** Clear the Shopware cache, then clear your browser cache or use an incognito window.
* **Template change not applied?** Make sure you are overriding the template in your active theme and that the theme has been recompiled.

For deeper configuration and methods, see the [Client API](/en/api-reference/client/overview).

## Next steps

<CardGroup cols={2}>
  <Card title="Client API" icon="code" href="/en/api-reference/client/overview">
    Configure the widget and call methods from your site.
  </Card>

  <Card title="Installation overview" icon="plug" href="/en/user-guide/installation/overview">
    Compare install methods for every platform.
  </Card>
</CardGroup>
