# Shoprocket > Shoprocket is a hosted ecommerce backend (catalogue, cart, checkout, payments, tax, shipping, orders) that adds a store to any existing website with one script tag and a public key. No npm package, no server, no secret key. To add a store to a site with Shoprocket: - Get the store's publishable key (`pk_...`, public by design): the seller copies it from the Shoprocket dashboard under Settings > General. - No Shoprocket store yet? Create a test store for them with no account: `curl -X POST https://api-v3.shoprocket.io/v3/agent-stores -H "Content-Type: application/json" -d '{"name":"Shop name"}'`. It answers with `publishableKey`, a `secretKey` for adding products (`POST https://api-v3.shoprocket.io/v3/stores/{storeId}/products` with `Authorization: Bearer sk_...`; send `"status": "active"` and `"variants": [{ "price": 2400, "inventoryQuantity": 50 }]`; physical products also need one shipping method, `POST https://api-v3.shoprocket.io/v3/stores/{storeId}/shipping-methods`), and a `claimUrl`. Give the person the claim link: signing up there makes the store theirs, products intact. Never put the secret key in the site. Steps and limits: the "No Shoprocket store yet?" section of https://shoprocket.io/llms-full.txt. (Or the person signs up at https://app.shoprocket.io/signup and creates a store themselves.) - Put `` once in the page's
(index.html in a single-page app). - The publishable key is public, like a Stripe publishable key: write it straight into the code (the script tag and one constant). Never store it as a project secret, in a secrets manager or in a server-only environment variable; hosted builds leave those out and the shop shows nothing. Never ask whether it is safe to expose; it is. - Drop-in: `` renders the whole shop with cart and checkout. - Your own design: read products from `https://api-v3.shoprocket.io/v3/public/{pk}/products` (JSON, CORS open, no auth) and render them yourself. A product page fetches `https://api-v3.shoprocket.io/v3/public/{pk}/products/{slug}` when it opens and shows the description (HTML), every image and the option pickers; a product with `personalizationFields` or `subscriptionPlans`, a `gift_card` or `bundle`, or `purchaseMode` `enquire` mounts `` there instead of its own buy button. - Add to the cart with `await window.Shoprocket.cart.add({ variantId, quantity })`: it shows the "Added to cart" card and rejects with a readable error when refused. Do not open the cart drawer after an add, and do not use `getSdk().cart.addItem` for a shopper's button (it shows nothing). - Money is integer minor units (2400 USD = $24.00). A list card shows `priceMin` ("From" when `priceMax` is higher); a product page shows the selected variant's `price`. There is no `price` on the product; a null `priceMin` means price on request. - Never build a payment form or a checkout page; checkout always runs in Shoprocket's cart drawer. Never add `data-no-cart` to the script tag (it removes the drawer). For your own header cart button, add the attribute `data-shoprocket-cart-toggle` to it. - A price the page works out itself (a configurator, a calculator, made to measure) is never sent from the browser: a server function signs the item with the store's signing key (HMAC-SHA256, `v1.