How to Add a Shopify Buy Button to Your Website

Inside Shopify admin, add the Buy Button sales channel, then go to Sales channels > Buy Button > Create a Buy Button, pick a product or collection, style it and click Copy code. Paste the code into an HTML or code block on your other site. Orders, stock and payouts stay in Shopify.

What the Buy Button can embed
TypeShowsCheckout opens
Product Buy ButtonOne product with image, price, variantsCart drawer, new tab or same tab (your choice)
Collection Buy ButtonA grid of products from one collectionCart drawer, new tab or same tab

Updated

The Buy Button lets a site that is not a Shopify store sell Shopify products. A blog, a band page or a portfolio can show a product card with a working cart, while Shopify runs inventory, taxes and checkout. It suits a few products alongside other content; for a full catalogue a dedicated store is easier.

Add a Shopify Buy Button on We.Inc, WordPress, Wix, Squarespace or plain HTML

We.Inc

  1. In Shopify, create the Buy Button and keep the generated details to hand.
  2. In the We.Inc builder, go to ... > Add-ons and open Shopify Buy Button.
  3. Fill in the fields it asks for, turn it on and wait for the saved message.
  4. Tell the AI chat which page should show it, such as 'add my Shopify product to the Shop section'.
  5. Publish and run a test order.

WordPress

  1. Copy the Buy Button code from Shopify.
  2. Edit the page and insert a Custom HTML block.
  3. Paste the code and Update.
  4. View the live page and add an item to the cart.

On WordPress.com the Buy Button's script only survives on a paid plan with plugins and hosting features activated.

Wix

  1. In the Editor, go to Add Elements > Embed Code > Embed HTML.
  2. Click Enter Code and paste the Buy Button code.
  3. Click Apply and resize the box so the cart drawer has room.

Wix places HTML embeds in a sandboxed iframe, so the cart opens inside that frame. Set checkout to open in a new tab for a cleaner experience.

Squarespace

  1. Open the page editor and insert a Code block.
  2. Paste the Buy Button code and save.
  3. Check the live site, as code blocks do not run in the editor.

Requires the Core, Plus or Advanced plan for JavaScript in code blocks.

Plain HTML

  1. Paste the code where the product card should appear.
  2. Keep the div and the script together; the script looks for that div's ID.
  3. Upload and test a checkout.

Sources

Checked October 28, 2026: the Buy Button pages we read.

  • Shopify Help Center, creating a Buy Button: https://help.shopify.com/en/manual/online-sales-channels/buy-button/create-buy-button
  • Wix Embed HTML and its sandboxed iframe: https://support.wix.com/en/article/wix-editor-embedding-a-site-or-a-widget
  • WordPress.com script tag rules by plan: https://wordpress.com/support/code/

Buy Button or a full store?

If you sell under a dozen items and your site is mainly content, the Buy Button keeps everything on one site. Once you need filtering, search across products or many collections, a full Shopify store or a store app on your site makes more sense.

Our guide to accepting payments on a website compares this with Stripe and PayPal options for single products.

How it works

  1. Add the Buy Button sales channel in Shopify admin.
  2. Create a Product or Collection Buy Button.
  3. Choose layout, colours, button text and what happens on click.
  4. Copy the generated code.
  5. Paste it into your website and test a purchase.

Tips

  • Shopify's help pages warn that purchases through the button carry third-party transaction fees unless Shopify Payments is active, so check that before launch.
  • Under Advanced settings you can make checkout open in the same tab, which tends to feel smoother on phones than a new tab.
  • One collection button is easier to maintain than ten product buttons: add a product to the collection in Shopify and it appears on your site.
  • The card loads by script after the page, so leave room for it in your layout to avoid content jumping.

Frequently asked questions

Do I need a Shopify plan for the Buy Button?

Yes, you need an active Shopify store with the Buy Button channel. Check Shopify's current pricing page for which plans include it.

Will Buy Button sales show in my normal Shopify orders?

Yes. They are regular Shopify orders, tagged with the Buy Button channel, and use the same inventory and fulfilment.

Can I change the button after pasting it?

Styling changes generally mean editing the button in Shopify and copying fresh code. Product details such as price and images update from Shopify automatically.

Related: Accept payments on a website, Start a Shopify store, Stripe payment links, Build an ecommerce website, WooCommerce vs Shopify.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Guides

Product

Who It's For

Features

Resources

Company

View Sitemap