You can sell products from a blog post, portfolio, or landing page with a Shopify Buy Button. For example, a reader following your candle-making tutorial can add a supplies kit to their cart right from the article, then pay through Shopify Checkout.
Checkout opens in a new window by default. If you’d like shoppers to stay in the same browser tab, select Redirect in the same tab under Advanced settings when you create the button. On Wix, checkout opens in a new window.
This guide covers what the Buy Button is, where to place it, and how to set it up on your website in three steps.
What is a Shopify Buy Button?
A Shopify Buy Button is an embeddable purchase button and product card that lets customers buy your products from any web page without visiting a separate online store. Shopify generates the code to display product details, images, and a checkout option on any website, creating a direct path to purchase for shoppers from wherever they discover your products.
Whether you run a blog, a portfolio site, or a page on WordPress, you can create a Shopify Buy Button for a single product or a collection of products, then paste the HTML code into your page. Visitors see the product, click the button, and complete their purchase through Shopify’s secure checkout.
The Buy Button can add ecommerce functionality to any page that generates traffic without requiring you to manage a full Shopify store. You can customize the button’s color scheme, size, font, and whether the checkout opens in a new browser window. You can also customize the layout, like showing the price directly on the button or hiding the product description.
Tip: The Buy Button works directly with your Shopify admin, so you can manage orders, track inventory, and access customer data from one place, even if your products are displayed across multiple websites. If you change a product’s price or description in Shopify, the update appears wherever you’ve embedded that product. To change the button’s design in the Buy Button editor, generate a new embed code and replace the old one on your site.
Where to use a Shopify Buy Button
- Blog posts and content pages
- Dedicated landing pages
- Partner and affiliate websites
- Portfolio and personal websites
- Email campaigns, newsletters, and social media
- Pop-ups and promotional overlays
The Buy Button is designed to meet customers where they already are by bringing the shopping cart directly to them. Here are common placements and their benefits:
Blog posts and content pages
Embedding a Buy Button inside a blog post connects reading to buying. Readers can choose a product in the post and continue to Shopify Checkout.
Benefits: The purchase option sits alongside the content that’s already building interest in the product. If you’re publishing a candle-making tutorial, for example, you could use the Buy Button to let readers add your candle-making supplies to their cart within the article itself.
Dedicated landing pages
Landing pages built for product launches, seasonal campaigns, or ad traffic pair well with Buy Buttons. The page is already designed to drive a single action, and the Buy Button gives visitors a direct path to purchase without extra navigation.
Benefits: Fewer steps between ad click and checkout give shoppers fewer chances to drop off.
Partner and affiliate websites
If influencers, affiliates, or media partners feature your products on their own sites, the Buy Button lets them add a purchase button to their page.
Benefits: Your products can generate sales from any partner site while all order management flows back to your Shopify admin. Partners don’t need to handle payments or fulfillment.
Portfolio and personal websites
For creators—artists, designers, podcasters, musicians—who already have a personal website displaying their work, a Buy Button adds a buy option without building a separate online store.
Benefits: It keeps the site’s existing design intact while adding ecommerce functionality. There’s no need to migrate your content or maintain a second website.
Email campaigns, newsletters, and social media
For an email, newsletter, or social post, share a checkout link for the product you’re promoting. With the Buy Button channel installed, open the product in Shopify and select More actions > Create checkout link. Choose the variant you want to feature and click Copy link.
For example, if your newsletter announces a new print, add the link to a “Buy the print” button in the email. Each reader who follows it gets a fresh checkout with that print already selected.
Pop-ups and promotional overlays
Buy Buttons can be embedded in pop-up windows or promotional overlays on any web page, pairing a featured product or time-limited offer with an immediate option to purchase.
Benefits: Pop-ups capture attention at a specific moment—a page scroll, an exit intent, a timed delay—and the Buy Button lets visitors act on that attention before it fades.
Tip: Buy Buttons on pages that are already part of your Shopify online store can interfere with the native checkout process, so instead only use them on external websites and blog posts.
Get started with Buy Button: 3 steps
- Add the Buy Button sales channel to your Shopify store
- Create a Buy Button
- Add the Buy Button embed code to your website HTML
Here’s how to add the Buy Button channel to your Shopify store, create your first button, and add the embed code to your website:
1. Add the Buy Button sales channel to your Shopify store
Log in to your Shopify store. If the Buy Button is already listed under your sales channels in the left-side menu, you can skip ahead to step two.
On desktop
- Open the Buy Button channel in the Shopify App Store and click Install.
- Pin the app to your admin navigation for quick access (optional). If you don’t pin it, you can always find it by clicking “Sales channels” and selecting “Buy Button” from your installed channels.
On mobile
- In the Shopify app, open the menu and tap Sales channels.
- On the Add sales channel screen, select Buy Button, then tap Add app.
2. Create a Buy Button
First, open the product in your Shopify admin. In the Publishing section, make sure it’s available to the Buy Button sales channel. If you’re embedding a collection, check availability for each product you want shoppers to see.
Once the Buy Button channel is added, navigate to the Buy Button tab and click “Create a Buy Button.”
You’ll be asked whether you want to create a button for a single product or a collection. Select your preferred option, then choose which products you’d like to feature. If you’re creating buttons for collections, you can display an entire product line in a single embed.
After making your selection, you’ll be taken to the Buy Button editor, where you can customize the following components: layout, button style, click behavior, cart settings, and checkout options—all before generating the embed code.
How to customize your Buy Button
The Buy Button editor displays customization options on the left and a live preview on the right. You can toggle between desktop and mobile views at the top of the editor to see how your button will display on different screen sizes.
Here’s what you can adjust:
- Product variant. Select which variants of the product you want to make available through the Buy Button.
- Layout. Choose between “Basic,” “Classic,” and “Full view.” Each layout option changes how much product information is shown alongside the button.
-
Click action. Choose what happens when a shopper clicks. If you add several Buy Buttons to one page, choose the same action for all of them.
- Add product to cart lets shoppers keep browsing and add other products before checkout.
- Direct to checkout takes shoppers straight to checkout with the selected product.
- Open product details lets shoppers view photos, choose a variant, and add the product to their cart. This option is available with the Basic and Classic layouts.
- Button style. Customize the shape, font, and color of your Buy Button to match your brand.
- Layout settings. Fine-tune button alignment, text, and size settings for greater control over how the button displays on your page.
- Shopping cart. Adjust the settings for the cart widget, including copy and colors. You can also add an “Order note” field to collect special instructions from customers. (Cart editing is available only if you’ve chosen “Add product to cart” or “Open product details.”)
- Detailed pop-up. If you chose “Open product details” as your click action, you can customize the text, colors, and typography of the product details pop-up window.
Changing these settings will apply only to new Buy Buttons you create going forward. Buy Buttons that have already been embedded on your website will not update automatically—you’ll need to generate new code and replace the old embed.
When you’re happy with your design, click “Next” in the top-right corner to generate the embed code.
3. Add the Buy Button embed code to your website HTML
After clicking “Next,” Shopify will automatically generate the embed code for your Buy Button. Click “Copy code” to copy it to your clipboard.
Paste this code into the HTML of any web page. Once added, the code will create a Buy Button and, depending on your settings, an embedded shopping cart that connects directly to your Shopify admin. You manage and process all orders from your Shopify store, no matter where the button appears.
Note: The exact process for adding the embed code varies depending on your website builder and theme. Some platforms have a dedicated HTML block or code widget, while others require you to edit the page’s source code directly.
Adding Buy Button script tags
Some website builders require you to paste script tags separately in your site’s header, while placing the remaining code in the body of your page where you want the Buy Button to appear.
To do this:
- Copy the entire
<script>element from the embed code Shopify generated. - Paste it into your site’s header and save your changes.
- From the original embed code, copy only the
<div>element. Paste it into the page where you want the button to appear.
- Save the page, open it in your browser, and test the button through to checkout.
Tip: If an older, custom-coded button displays but shoppers can’t check out, check which version of Buy Button JS your site loads. Shopify retired checkout for older versions on August 1, 2025. You can create a fresh button in the Buy Button channel and replace the old embed, or have your developer update the library.
Tip: For platform-specific instructions on adding the Buy Button code to WordPress, Squarespace, or Wix, check the Shopify Help Center guide on adding Buy Button embed code.
Add ecommerce to any website with Buy Button
DECromancer, a Canadian seller of vintage computing hardware, runs its own website. Visitors can browse floppy drive controllers alongside technical information about the machines they fit. The merchant uses Shopify for the cart and checkout, so it can sell from the same site where customers research the parts.
Add the Buy Button sales channel to your Shopify store to get started, or explore Shopify plans if you don’t have an account yet.
Read more
- Amazon Dropshipping Guide- How To Dropship on Amazon (2024)
- The 9 Best Dropshipping Websites for Your Online Store
- How To Source Products To Sell Online
- What To Sell on Shopify: Top 12 Things To Sell (2024)
- What is Shopify and How Does it Work?
- The Most Profitable Digital Products to Sell (and How to Promote Them)
- What Is Affiliate Marketing and How to Get Started
- How to Create Your Shipping Policy (With a Template and Examples)
- 19 Best Shopify Apps for Clothing Stores
- 14 Advanced Strategies to Drive More Holiday Sales With Facebook Ads
Buy Button FAQ
Is the Shopify Buy Button secure?
Yes. Customers who click a Buy Button complete their transaction through Shopify’s PCI-compliant checkout, which covers all six PCI standard categories. Payment and personal data are protected regardless of where the Buy Button is embedded.
What is the cost of a Shopify Buy Button?
The Buy Button is included with all Shopify plans. There’s no additional fee to use the Buy Button channel—you only pay your standard Shopify subscription and any applicable transaction fees.
What are the benefits of the Buy Button?
The Buy Button lets customers shop from your website or blog and pay through Shopify Checkout. You can sell without building a full online store. All orders, inventory, and customer data sync back to your Shopify admin across every site where you’ve embedded a button.
Can the Shopify Buy Button be added to WordPress, Squarespace, or Wix?
Yes. You can embed a Buy Button on Squarespace, Wix, self-hosted WordPress sites, and WordPress.com plans that allow custom JavaScript. Paste the Shopify embed code into your page’s HTML or code block. On WordPress, you can also use the Shopify plugin for WordPress to add products or collections directly in the block editor.
How can the Shopify Buy Button be changed?
Create a new button in your Shopify admin with updated settings, generate new code, and replace the old embed code on your website. You can also modify the embed code directly in your site’s HTML to change colors, button text, or product components. Changes made in the Buy Button editor don’t automatically update previously embedded buttons.












