Amazon.com (AMZN -1.11%) has been the best-performing stock on the market since its 1997 IPO, returning a whopping 50,000% over its history.

Today, the company is one of the most valuable in the world, up there with fellow tech giants like Apple and Alphabet, and it has come to define the industry it pioneered: e-commerce. It's virtually synonymous with online shopping and is a major reason e-commerce is one of the fastest-growing sectors in the market, with sales growth of about 15% annually. Today, e-commerce has become such a threat to brick-and-mortar stores that traditional retail seems to be at a tipping point. 

A man with a laptop open holding a credit card

Image source: Getty Images.

But investors' chance to get blockbuster returns out of Amazon is probably over. While it has continued to outperform the market, with shares even tripling over the last three years, it will be difficult for the stock to double from here as that would give it a market valuation of nearly $1 trillion, far more than any other company in the world. Amazon could get there, but it will likely take at least a few years.

A better approach to multi-bagging returns in the e-commerce sector is to use the picks-and-shovels strategy, named for the businesses that got rich during the gold rush era. Rather than invest in the principal businesses driving growth, put your money in stocks that are providing essential services to customers and businesses, which should grow alongside the e-commerce trend. Let's take a look at two of the winners below.

1. XPO Logistics 

One of the ten biggest logistics companies in the world, XPO Logistics (XPO -2.71%) shares have surged by 152% over the past year and over 1,000% over the last decade as growth in e-commerce has translated into expanded demand for its services.  

XPO is a specialist in last-mile logistics, the task of delivering to customers' homes that has befuddled retailers and shipping companies and made e-commerce particularly challenging for businesses. It's the largest provider of last-mile logistics for heavy goods in North America and the largest manager of expedite shipments. Its global fleet includes 16,000 tractors and 39,500 trailers.

Furniture delivery is a key area for XPO, and is expected to grow as Amazon pushes to furniture sales with segments like Amazon Home Services. Ikea and Amazon are both partners with XPO.

The company has grown dramatically from revenue of $278.6 million in 2011 to $14.6 billion last year thanks to a series of acquisitions, including Con-Way and Norbert Dentressangle. 

Operating income increased 49% in its most recent quarter, and CEO Brad Jacobs is gunning for more acquisitions. The company has also easily beat earnings estimates in its last five quarters. As e-commerce continues to grow, XPO should inevitably surge along with it.

2. Shopify

Shopify (SHOP 1.03%) provides software and cloud-based services for retailers to manage e-commerce operations. The stock has become a market darling recently as the stock has nearly tripled over the past year.

The company focuses on small and medium-sized business, and had over 377,000 merchants in 175 countries as of the end of the year, with the majority being in the U.S. 

As a subscription based business where most plans cost $50/month, Shopify will gain leverage as it adds more customers. Last year, revenue nearly doubled to $389.3 million, though operating loss more than doubled -- hitting $37.2 million as the company spent aggressively on research and development, marketing, and G&A costs. 

Amazon at one point challenged Shopify with its own webstore software, but even it backed out two years ago and said it would go with Shopify's software instead. 

The company is the leader in the fast-growing e-commerce software category, and aims to eventually reach 10 million merchants. For the current year, the company sees revenue growth around 60%, and expects its adjusted operating loss, which accounts for stock-based compensation to narrow to -$14 to -$18 million. 

With strong customer retention, and a popular product in a fast-growing industry, Shopify looks like it could follow in Amazon's footsteps.