# Installation The first step to using Kustom Elements is adding the installation script to your site. This script registers the web components and connects them to your merchant account. All elements depend on it, so it must be placed before any element tags on the page. ## Prerequisites - A Kustom merchant account (Playground for testing, Production for live) - Access to the [Kustom Portal](https://portal.kustom.co/) to get your installation script ## First time setup 1. Log in to the [Kustom Portal](https://portal.kustom.co/), keep in mind that you need to be logged in to the same environment that you want to use the elements in, the snippets are not interchangeable between environments. 2. Go to the **Elements** section. 3. You need to [register the domains](#allowed-domains) where your code will run. 4. Then click the "Generate" button to get the installation script. ![Kustom Portal — First time setup](/assets/first-time-whitelist.bd51ba9c6ac854f3e2051a34ac4d6a864ea5e58686eb908a7e453cc1c3c7f0d0.a9fa48fa.png) ## The installation script Copy the installation scripts and place them as high in the `` of your page as possible. Please be aware that your portal view might be a bit different from the first time you start working with the elements but you should still be able to locate the copy script button. ![Kustom Portal — Elements installation script](/assets/copy-installation-script.a40e3b22b57ffda4474a81b315d9fa3028904fd87ca298e630490486215bae1e.a9fa48fa.png) ## Allowed domains - Add each domain where Kustom Elements will be used (e.g. `www.my-shop.com`, `checkout.my-shop.com`). - Only for playground environments, you can use wildcards to allow all subdomains, for example `*.my-shop.com`. - Use your **Playground** installation script only on test domains; use your **Production** script only on live domains. ![Kustom Portal — Domain configuration](/assets/whitelisted-domains.2e5b7922b961a168aab071149065b586810cef5510b99a382c034c41d06c6396.a9fa48fa.png) ## Add the script to your site Place the installation script in your site’s `` so it loads before any element tags. Typically this means adding it to your main layout or template that wraps all pages where you use Kustom Elements. **Example (do not copy this code, it is just an example, use the script you copied from the Kustom Portal):** ```html ``` ## Next steps Once the installation script is in place, you can add Kustom Elements to your pages. See [Usage](/contents/checkout/kustom-elements/integration-guide/usage) for how to embed the elements.