While it might be unsettling to invest in a company that has already seen its stock soar over 3,600% in the past five years, seeking out strong businesses to provide a solid foundation for your portfolio can be one of the best things you do as an investor.

Shopify (SHOP -2.37%) can fill such a role. Despite its incredible appreciation over the past five years, Shopify could be one of the best foundational stocks for your portfolio over the next decade as it offers up both stability and growth for long-term investors. 

Person with packages and calculator.

Image source: Getty Images.

The bedrock for e-commerce

Shopify is on a mission to "make e-commerce better for everyone," and it is doing this by offering a wide variety of solutions to help people launch, grow, market, and manage their businesses. Its tools allow merchants to sell from anywhere and manage nearly every modality of their business -- from brick-and-mortar stores to social media shops.

It not only enables customers to set up shop everywhere, but it fills out its ecosystem with payment processing, logistics, and even loans through Shopify Capital. The company was built on supporting the independence of small and medium-sized businesses (SMBs), and these supplemental services have fueled its continued growth. 

Shopify has gone on to support more than just SMBs, however, as it is now attracting customers of all sizes, including big-name brands like General Mills. As of the this writing, the company has served over 1.7 million businesses around the world.

Shopify's resilient position

With a large and rapidly growing customer base, Shopify has become the second biggest company by U.S. e-commerce sales as of 2020, holding 8.6% of the total market. It has been able to beat out behemoths like Walmart and eBay because of its broad (and expanding) offering, combined with its neutrality. While Amazon helps millions of businesses establish an e-commerce presence, it competes with them at the same time, creating conflicts of interest as the platform provider. 

Shopify's cumulative gross merchandise volume (GMV) reached $400 billion in the third quarter, and revenue grew 46% year over year to $1.12 billion. The company breaks out its business into two segments: merchant solutions and subscription solutions. The former primarily comes from transaction fees on GMV, and subscription revenue can range from $30 per month for entrepreneurs to over $2,000 per month for large enterprises.

The company's monthly recurring revenue -- which has been growing at a compound annual rate of 43% over the past five years -- reached $98.8 million in the latest quarter. Shopify Plus -- its subscription service for enterprises -- made up $27.2 million of that base.

With its increasing dominance within the market, the company produced $615.4 million of free cash flow in the past 12 months while holding over $7.5 billion in cash and securities. Year to date, adjusted net income of $641.5 million has more than doubled from the same period last year.

Expanding its optionality

Shopify is doing an incredible job both expanding its platform and making its current offerings more valuable. It has formed partnerships with many companies such as TikTok, where Shopify merchants can now add products that link directly to their online store checkout.

This ongoing expansion is creating sustainable optionality. In the third quarter, management announced Shopify Balance -- a money management tool -- and Shopify Markets, which will allow merchants to enter new geographies with the company's cross-border payment system so merchants can grow even more with Shopify.

The company has also been building out a fulfillment network to provide logistics and shipping solutions for merchants. This network will further strengthen Shopify's relationship with its merchants while also generating massive amounts of data to help optimize efficiency and supply chain logistics within the network.

The market sees a lot of value in these various opportunities, and Shopify trades at 57 times earnings. Despite the sticker shock, I believe it is a premium worth paying. The stock won't repeat its performance over the past five years, but it's not too late to buy in as this growth story is far from over.

A proven track record is exactly what makes Shopify a great candidate for a bedrock holding in your portfolio.