How do you add custom functionality to a Shopify store?

Adding custom functionality to a Shopify store can be done in a few different ways depending on what you need to achieve. Here’s a breakdown of the main approaches:


1. Use Shopify Apps

Best for: Common features like subscriptions, reviews, upsells, etc.

  • Go to the Shopify App Store

  • Install an app that fits your needs (free and paid options available)

  • Most apps have setup instructions and support

Examples:

  • Klaviyo for email marketing

  • Yotpo for reviews

  • Recharge for subscriptions


2. Modify the Shopify Theme

Best for: Small UI changes, custom sections, styling, or behavior

a. Online Code Editor

  • Go to Online Store > Themes > Actions > Edit code

  • Modify files like:

    • theme.liquid – overall layout

    • product.liquid, collection.liquid, etc. – page templates

    • assets/custom.js, assets/custom.css – scripts and styles

b. Sections & Snippets

  • Create new Liquid files in /sections or /snippets for reusable content

  • Warning: Always backup your theme or work in a duplicate theme before editing!


3. Use Shopify Scripts (Shopify Plus only)

Best for: Custom discount logic, cart rules, shipping/payment changes

  • Written in Ruby

  • Found under Shopify Admin > Script Editor


4. Use Shopify Functions

Best for: Extending backend logic like checkout and discounts (newer alternative to Scripts)

  • Written in Rust and deployed via custom apps

  • Highly performant and secure

  • Requires CLI setup and development experience


5. Build a Custom Shopify App

Best for: Fully custom functionality, external API integration, admin tools

  • Use Shopify’s CLI

  • Tech stack: Node.js or Ruby backend, Polaris for UI, Shopify APIs

  • Can be public, custom, or private apps


6. Use Shopify APIs

Best for: Integrating with external systems or building headless storefronts

  • Storefront API – for custom frontends

  • Admin API – manage products, orders, customers

  • Checkout API – for custom checkout experiences (Shopify Plus)


Example: Adding a Custom Script for a Discount Banner

liquid
{% if cart.total_price > 5000 %}
<div class="banner">You've unlocked a 10% discount!</div>
{% endif %}

This would go in your theme.liquid or a cart template file.