The Michigan Consumer Sentiment Index reached 63.9 in June 2023, up from a record low of 50 in June 2022. That uptick in optimism comes as inflation continues to cool, and it hints at stronger consumer spending in the coming months, which bodes well for Shopify (SHOP 1.11%) and Etsy (ETSY 0.34%) shareholders.

More importantly, both companies are backed by a solid long-term investment thesis. Shopify and Etsy will undoubtedly benefit as online shopping continues to make up a greater share of retail spending in the years ahead, and both stocks could soar as rising consumer sentiment helps usher in the next bull market.

Here's what investors should know.

1. Shopify

Shopify ran headlong into trouble last year. Revenue growth slowed as consumer spending softened in response to high inflation, and profitability disappeared as the company plowed capital into its nascent logistics network. But Shopify seems to have turned a corner this year. First-quarter revenue increased 25% to $1.5 billion, an acceleration from 22% growth in the prior year, and the company returned to GAAP profitability with earnings of $0.05 per diluted share.

Better yet, profitability should continue to improve. Shopify sold its capital-intensive logistics business to Flexport in the second quarter. The deal ensures merchants will still have access to freight, fulfillment, and delivery services through Flexport while allowing Shopify to refocus on its core competency: commerce software.

Indeed, Shopify is the market leader in e-commerce software, and Shopify Plus -- a more robust platform built for larger brands -- is the most popular omnichannel commerce software. That success hints at an unmatched ability to empower merchants. The Shopify platform integrates physical and digital sales channels behind a single dashboard, and it includes an array of adjacent services that help merchants start, run, and grow their businesses. That includes solutions for payments, financing, and taxes, as well as tools for marketing, cross-border commerce, and wholesale commerce.

According to industry experts, retail e-commerce sales will rise 14% annually through 2030, and wholesale e-commerce sales will climb 20% annually during the same period. Those tailwinds should keep Shopify in growth mode for years to come.

Yet, shares currently trade at 13.8 times sales -- not a cheap valuation but an absolute bargain compared to its three-year average of 31.1 times sales. At this price, investors should buy a few shares of this growth stock.

2. Etsy

Etsy grew at a phenomenal pace following the onset of the pandemic, but economic difficulties have taken the wind from its sails. First-quarter gross merchandise sales slipped 5% year over year as spend per active buyer declined. The company still managed to grow revenue 11% to $641 million, but GAAP earnings declined 12% to $0.53 per diluted share.

Nevertheless, Etsy should be able to reaccelerate growth as economic conditions improve, and consumer spending rebounds. Despite the highly competitive nature of the e-commerce industry, Etsy has carved out a defensible niche where even retail giant Amazon has failed to find success. Specifically, the Etsy brand is synonymous with handcrafted, vintage, and artisan goods. Many products on its platform can even be customized for specific buyers, creating a somewhat unique shopping experience. That strategy has helped Etsy become the sixth most-visited online marketplace in the world.

Even so, management sees room for improvement. Its product roadmap aims to make the marketplace a more compelling and engaging shopping destination. For instance, Etsy is incorporating artificial intelligence (AI) across its tech stack to improve the relevance of search results, recommendations, and ad campaigns. Additionally, the company recently debuted a purchase protection program that entitles buyers to a refund for damaged or lost deliveries while ensuring sellers keep their profits. Etsy is also expanding its star seller program to help buyers identify sellers that provide superior customer service.

Looking ahead, Etsy will never be as big as Amazon -- its niche strategy makes that impossible -- but the company could still create wealth for shareholders. Management bullishly values its addressable market at $466 billion, and that estimate increases to $2 trillion if relevant products currently sold offline are included. Yet, Etsy stock currently trades at 4.6 times sales, near its cheapest valuation in the last five years. That creates an excellent opportunity for patient investors to buy a small position.