> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.review-collect.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Install the product review widgets on PrestaShop

On PrestaShop, Review Collect widgets are installed by pasting a code snippet into your theme templates. It takes a few minutes, with your developer if you have never edited your theme.

| Before you start: your store must be connected to Review Collect (see [PrestaShop Integration](https://help.review-collect.com/en/article/prestashop-integration-1mncw9g/)) and the Product Reviews option enabled on your account.

## Copy the widget code

1. Go to [Product Reviews → Widget](https://app.review-collect.com/home/product-reviews/widget)
2. On the widget you want, click **Customize**, then open the **Install** tab
3. Click **Copy**: your key is already in the code, nothing to change

| The code includes `lang="{$language.iso_code}"`: the widget shows in the page's language, and reviews written in another language are translated automatically.

The Product reviews widget code looks like this (`XXXXX` = your key):

```
<script src="https://w.review-collect.com/v1/rc-widget.js" defer></script>
<rc-product-reviews key="XXXXX" product-id="{$product.id_product}" lang="{$language.iso_code}" id="rc-reviews"></rc-product-reviews>
```

## Add the reviews list to the product page

1. Open the `templates/catalog/product.tpl` file of your theme (via FTP or your host's file manager)
2. Paste the code where the reviews should appear, usually below the product description
3. Save, then clear the cache: **Advanced Parameters → Performance → Clear cache**

| If you use a child theme, edit the child theme's file: your changes will survive theme updates.

## Add the star badge under the title

1. In the same file, find the product title (`{$product.name}`)
2. Paste the Product star badge code right below it
3. Clear the cache

```
<rc-product-reviews key="XXXXX" product-id="{$product.id_product}" lang="{$language.iso_code}" widget-type="badge" href="#rc-reviews" style="display:block;min-height:1.5em"></rc-product-reviews>
```

| The `<script …>` line is only needed once per page: if the reviews list is already on the product page, paste only the second line. A click on the badge scrolls to the list.

## Create the all reviews page

1. In the back office, go to **Design → Pages**, click **Add new page** (e.g. "Customer reviews"), leave the content empty and save
2. Note the page's identifier, shown in the ID column of the list
3. Open the `templates/cms/page.tpl` file of your theme and paste the code below in the content block, replacing `5` with your page's identifier
4. Clear the cache, then add the page to your menu

```
{if $cms.id == 5}
<script src="https://w.review-collect.com/v1/rc-widget.js" defer></script>
<rc-reviews-page key="XXXXX" lang="{$language.iso_code}"></rc-reviews-page>
{/if}
```

| Why the template? PrestaShop's content editor strips scripts: pasted directly into the page, the widget would not show.

## Check your store

1. Open the page of a product with at least one published review: the badge appears under the title, the list below the description
2. Open your reviews page: the average rating and the reviews of all your products are displayed

| Nothing shows? Check that the cache is cleared, that the file you edited belongs to the active theme, and that the product has at least one published review in Review Collect. A settings change takes 5 to 10 minutes to appear.