What happened

Shares of e-commerce company Shopify (SHOP 6.17%) gained 13% in June according to data provided by S&P Global Market Intelligence. It's still benefiting from investor momentum after a positive first-quarter report in May as well as general investor enthusiasm about the stock market.

So what

Shopify had a magnificent run as e-commerce accelerated early in the pandemic, but it was too much too fast. It ran into serious problems last year as growth slowed down and it had built up too much to meet fading demand.

But Shopify is demonstrating that it's more than a pandemic sensation. It's showing signs it has a solid business model, with serious leaders that are actively working to make the company better. Instead of holding onto infrastructure that's bleeding cash, management is selling off its logistics network despite just getting started with growing it. That's a great signal for investors that management's paying attention to Shopify's core business. It's looking to stay efficient and get back to stronger profits, rather than pour money into endeavors that could ultimately undermine the overall business and generate shareholder disillusion.

Revenue increased 25% in the 2023 first quarter, and Shopify continues to gain clients and sales. It has pivoted from its identity as the e-commerce solution for small businesses to targeting large, enterprise clients, and it recently signed on companies like Zulily and Tim Hortons (owned by Restaurant Brands International.) Not only does that add revenue, it adds a lot more revenue than any single small business can provide.

It's also launching new products and services, such as its point of sales systems. These are bringing in new clients that are only looking for some solutions instead of Shopify's more complete packages.

Shopify is also demonstrating improvements in profitability. It posted $68 million in net income in the first quarter and $86 million in free cash flow.

Now what

Shopify could be one of the most important e-commerce companies in the next few years, and it's no surprise that its stock trades at a premium. E-commerce is still growing as a percentage of global sales, even though it e-commerce retailers have struggled in the aftermath of accelerated growth at the beginning of the pandemic.

Shopify stock up 87% in 2023 so far, and at this price, shares go for almost 15 times trailing 12-month sales. That's a lot lower than the astronomical valuation it sported in the previous bull market, but it's still pricey.

Considering its potential, investors may want to take a position even at this price. If the price falls, Shopify stock would be a no-brainer stock to buy.