Shopify (SHOP 2.27%), a leading e-commerce platform, delivered a solid first-quarter 2023 performance. It also decided to divest its logistics arm. Investors were delighted by the announcement, sending its stock price up by over 30%.

With the recent rally, the stock has soared by more than 100% from its 12-month low. The question arises for investors who missed the initial opportunity: Is it still a wise decision to invest in Shopify?

Let us explore further in this article.

Two employees using computer at work.

Image source: Getty Images.

An unexpectedly strong quarterly performance

After delivering some mind-blowing performance during the pandemic in 2020 and 2021, e-commerce companies generally faced headwinds since last year. The economy reopening and the generally weak global economy -- thanks to high inflation -- affected consumer spending.

Shopify was not immune to the external headwinds. In 2022, gross merchandise value (GMV) and revenue grew by 12% and 21%, respectively, compared to 47 % and 57% in 2021. The consensus was that 2023 would be even worse for the company.

Yet, investors were pleasantly surprised by Shopify's solid numbers for the first quarter of 2023. GMV grew by 15% to $49.6 billion, and revenue surged 25% to $1.5 billion. The company also delivered a free cash flow of $86 million, a considerable improvement from the negative free cash flow of $41 million in the previous period.

On top of that, Shopify guided for revenue to grow at a similar rate in the second quarter of 2023. It also expects to deliver positive free cash flow for each quarter of 2023. These recent updates suggest that the company has probably reached the bottom.

Less is more

Shopify has been nothing but a successful growth story. Since going public in 2015, its revenue has skyrocketed more than 20-fold  to reach $5.6 billion in 2022.

It began as a software-as-a-service (SaaS) company, offering an easy-to-use platform for small businesses to sell their products online. As time passed, it expanded its range of services to include payment, logistics, lending, and various other tools to assist merchants in managing their business.

But as Shopify grew, its business became overly complex, draining management's attention from its main quest of building the best commerce platform. To right this problem, the company decided to sell its logistics arm to Flexport in exchange for a 13% stake in the latter. Flexport will also become Shopify's official logistics partner, continuing the e-commerce objective of providing merchants with the best logistics service.

While we can debate the pros and cons of such a move, one significant positive impact is that the management team can now focus on what it does best: building state-of-the-art commerce software and solutions for merchants. Bringing back that focus will give Shopify the best chance of growing its market share in the U.S. and global retail industry.

For perspective, Shopify had only a 2% market share in the U.S. retail market in 2021 -- and much lower if we consider it from a global scale. To increase its market share, Shopify is moving deeper into offline retail via its POS services, expanding further into overseas markets, and penetrating the enterprise market via products like Shopify Functions.

In short, the prize for winning global commerce is enormous, and Shopify needs all the attention it can give to execute well. Selling the logistics arm might be the smart move it badly needed.

Valuation still matters

One crucial factor to assess before investing in Shopify stock is its valuation. We prefer to buy the stock at a fair or, better still, an affordable price. This approach provides a safety net to minimize our potential capital loss.

Since there is no simple answer to this exercise, we will compare Shopify's current valuation to its past and its peer. As of this writing, Shopify has a price-to-sales (P/S) ratio of 13.7, which compares favorably to its five-year average of 29. Yet, its P/S ratio is significantly higher than Amazon's P/S ratio of 2.2.

While the bulls might be comfortable with Shopify stock's premium valuation -- arguing that the company has significant prospects ahead -- the bears would cringe with such a high price tag. After all, Amazon is still one of the best companies in the world.

Is Shopify a buy?

Shopify surprised investors with a strong first-quarter 2023 performance, delivering solid top-line growth and a positive cash flow. Better still, it expected the strong performance to sustain throughout 2023.

Besides, its move to sell its logistics arm and refocus on core strengths could be a smart move to gain market share in the long run.

The downside is that the stock is still very pricey, even though the valuation has come down compared to the past. To me, that's a deal breaker.

Prudent investors would be best to err on the safe side and not jump into the boat, at least not until Shopify's valuation becomes more palatable.