> For the complete documentation index, see [llms.txt](https://docs.spectrumcustomizer.com/integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spectrumcustomizer.com/integration/ecommerce/front-end-integration.md).

# Front End Integration

The Spectrum front end is designed to be integrated into the front end of your ecommerce website. All necessary front end files will be delivered via the Spectrum CDN and are rendered dynamically within an HTML element.

### 1. Load the Spectrum JavaScript file in the HEAD tag

The Spectrum team will provide the full URL to fill in the `[ClientHandle]`. The `[SpectrumCdnEnvironment]` base URLs are listed in the [Environments](/integration/api/environments.md) page.

```markup
<script type="module" src="[SpectrumCdnEnvironment]/[ClientHandle]/frontend/js/customizer.esm.js"/>
```

### 2. Create an HTML div tag with an ID of spectrum-customizer

This is where the customizer experience will load on the page. Any surrounding container elements on the PDP should be 100% width to allow for responsive content.

```markup
<div id="spectrum-customizer"></div>
```

### 3. Relaunching the Customizer

The customizer will launch automatically on first load and set a relaunch function to `window.spectrumInitializeCustomizer`. If the customizer is closed by the user (or via the add to cart flow), you can relaunch it by calling `await window.spectrumInitializeCustomizer()`. Ensure that the id=“spectrum-customizer” div exists and window variables are updated as needed before relaunching.
