Shopify (SHOP 1.61%) stock has elbowed its way back into Wall Street's good graces this year. It helped that the e-commerce industry returned to growth after declining through most of 2022. But Shopify also made a strategic shift that's likely to boost efficiency while freeing up valuable resources.

Investors have responded to this good news by sending Shopify stock up by over 90% at one point in 2023. Shares have come down since then as fears rose about a recession on the way. But Shopify is still trouncing the wider market so far -- up nearly 60% this year. There are some good reasons for this rally, but investors should also be aware of one major risk in owning this stock.

Buy reason No. 1: Winning share

Shopify isn't alone in reporting faster e-commerce sales trends in recent months. The industry posted rare declines last year after spiking in 2021, but that growth hangover seems to have passed. The company handled $55 billion of transactions through its platform last quarter, up 18% year over year.

The even better news is that Shopify's overall revenue was up 31%, thanks to strong growth across several of its services. Merchant solutions revenue jumped, and so did payment processing volumes.

Sales are jumping thanks to a rising pool of customers, who are increasingly opting to sign up for additional business solutions. "We're not just shipping products faster," President Harley Finkelstein told investors in early August, "but we are also expanding our global merchant base."

Buy reason No. 2: The new look

Shopify is in the middle of a transformation project that's already starting to boost efficiency and cash generation. It has exited the expensive logistics business, helping cash flow land in positive territory for three consecutive quarters through mid-2023. This success points to improving profits over the coming years.

SHOP Cash from Operations (TTM) Chart

SHOP Cash from Operations (TTM) data by YCharts

Sure, Shopify is still posting losses today. But that's mainly due to one-time charges related to its restructuring. Operating income improved to 9% of sales in the second quarter, compared to 3% of sales a year ago, after accounting for costs associated with its logistics sale.

Assuming the company can keep gaining market share, profitability could easily expand into the double-digits in the next year or so. Most Wall Street pros are forecasting that earnings will improve to $0.49 per share this year from $0.04 per share in 2022.

1 reason to wait

Yet even the most successful business will generate mediocre investment returns if you pay too high a price. That's the biggest risk I see with this growth stock today.

Shares are priced at over 11 times revenue, up from about 7 times sales at the start of the year. For that valuation you could own much sturdier, more established software providers. Microsoft is available at 11 times sales, for example, and it boasts a profit margin of over 40% of sales. Palo Alto Networks, the cybersecurity specialist, is a bit more expensive at 13 times sales but has already demonstrated a clear path toward strong annual earnings.

Investors might want to watch Shopify stock for some clarity to develop about its earnings power. It is good news that the company will likely return to profitability over the next few quarters. But there are still big questions around its ability to achieve sustainable earnings in a softening economic environment.