Skip to content

How to integrate ReviewForest widgets in Shopware 6

No matter which of our 7 widgets you want to use — from the tree counter widget and the testimonial widget to the badge widgets — integrating them into your Shopware 6 store (version 6.7.x) always works the same way.

Every widget consists of two building blocks that you copy into your store together:

  1. The script: it loads the functionality from our servers.
  2. The placeholder (div): it tells Shopware exactly where the widget should appear.

Here’s what the structure looks like:

Widget code
<script src="https://widgets.reviewforest.org/main.js" defer></script>
<div class="reviewforest-app-YOUR-INDIVIDUAL-ID"></div>

Step by step: integration via Shopping Experiences

Section titled “Step by step: integration via Shopping Experiences”

This is the easiest way if you want to place the widget flexibly on your homepage or in a category.

  1. Open the admin area: Log in to your Shopware backend.
  2. Choose a layout: Go to Content > Shopping Experiences and open the layout for your page.
  3. Add a block: Click the plus icon (+) and, under the “Text” category, choose a simple Text block. Drag it to the spot where the widget should appear.
  4. Enable code mode: Click the text field you just placed. In the toolbar at the top you’ll find the </> (source code) icon. Click it.
  5. Insert the widget: Delete any sample text and paste your complete widget code (script + div) there.
  6. Save & check: Click Save in the top right. Reload your store in the browser to see the result.

Some stores have very strict security rules (Content Security Policy). If your widget doesn’t appear, Shopware is blocking the loading of external content.

  • Solution: Ask your technical team to add the domain reviewforest.org to the “whitelist” (allow list).

Since the widget loads data from ReviewForest, you should register it in your cookie consent tool (consent manager). That keeps you on the safe side when it comes to GDPR.

Our widgets are “responsive,” so they adjust automatically. If it ever looks a bit too wide on a smartphone, your admin can help out with a single line of CSS (e.g. max-width: 100%;) so everything fits perfectly.

Section titled “Pro tip: embed the widget globally in the footer”

If you want your ReviewForest widget to appear on every page of your store (at the bottom, above the legal notice or the payment methods), you’ll need to make a small change to your design code (theme).

Prerequisite: You should have access to your store’s files (via FTP or through your development agency) and use your own theme (don’t make changes directly in Shopware’s “Default” theme!).

Navigate to the following path in your store directory:

YOUR_THEME/src/Resources/views/storefront/layout/footer/footer.html.twig

If the file doesn’t exist there yet, just create it. It’s used to extend Shopware’s default footer.

Copy the following block into the file. It makes your widget appear in the right place without deleting the rest of the footer:

footer.html.twig
{% sw_extends '@Storefront/storefront/layout/footer/footer.html.twig' %}
{% block layout_footer_navigation %}
{# The original footer content is preserved #}
{{ parent() }}
{# This is where we embed your ReviewForest widget #}
<div class="container">
<script src="https://widgets.reviewforest.org/main.js" defer></script>
<div class="reviewforest-app-YOUR-INDIVIDUAL-ID" style="margin-top: 20px; text-align: center;"></div>
</div>
{% endblock %}

For Shopware to notice the change, you need to clear the cache. You can do this either in the admin area under Settings > System > Caches & indexes or via the console (terminal):

bin/console cache:clear

In some cases you’ll need to rebuild the theme once so the script gets linked correctly:

bin/console theme:compile

What your technical team needs to know (short facts)

Section titled “What your technical team needs to know (short facts)”

If you’d rather not do this yourself, just copy this part into an email to your agency:

  • Goal: Embed the global ReviewForest widget in Shopware 6.7.x.
  • Integration: Via a child theme in footer.html.twig.
  • Placement: Ideally in the layout_footer_navigation or layout_footer_bottom block.
  • Important (CSP): Please check the Content Security Policy. The domain widgets.reviewforest.org must be allowed for script-src and connect-src so the widget can load its data.
  • Performance: The script uses defer, so it doesn’t negatively affect rendering.