It was a rough first half of 2022 for the stock market. At the market close on June 30, the S&P 500 was down 21% and the Nasdaq was off 30%, leaving many investors' portfolios drowning in red. The upside of this brutal start to the year is that it has brought many high-quality businesses down to bargain valuations, creating compelling opportunities for investors.

However, just because a stock is trading for a cheaper valuation doesn't mean it's necessarily a good buy. Investors should look beyond the share price and dig into the fundamentals of the business to determine what's a value play and what's a value trap. Here are three undervalued companies I think make great buys for the second half of 2022 and beyond.

Amazon

Mostly known for its dominant position in the e-commerce space, Amazon.com (AMZN -1.11%) is in a position to have a stronger second half of 2022. When the company reported first-quarter earnings, the market reacted negatively to some of the headline numbers, further punishing the stock price. However, upon closer inspection, there is reason to believe the short-term headwinds facing the e-commerce side of the business are just a bump in the road.

The North America segment of Amazon's business had year-over-year growth of 8% in Q1, and the International segment posted a decline of 6%. Revenue from these two segments is comprised mostly of e-commerce sales, which were impacted by macroeconomic factors such as inflation and supply chain constraints. 

However, Amazon Web Services (AWS) grew 37% and now represents 16% of Amazon's total revenue, up from 13% in the year-ago quarter. Cloud infrastructure is a market that's expected to grow at 16% per year until 2030, providing a massive growth opportunity for Amazon.

With a price-to-sales (P/S) ratio of 2.4, Amazon currently trades for the same valuation as it did in 2016, when AWS accounted for approximately 9% of overall revenue. At this price, Amazon is hard to ignore.

Disney

It's easy to understand the negative impact that the pandemic had on Disney's (DIS -0.83%) business. With its parks and experiences segment decimated by worldwide lockdowns, it's been a rough past few years for the House of Mouse. 

One saving grace for Disney was the fortuitous timing of the launch of its Disney+ streaming service in November of 2019. The unexpectedly fast subscriber growth gave the business a much-needed lifeline as it was weathering the pandemic storm. 

However, Disney is now emerging from this dark period, and has some bright skies ahead. In Q2 of 2022 (ended April 2), Disney posted year-over-year revenue growth of 23%. Most importantly, the segment that includes the theme parks, cruise lines, and other experiences saw revenue growth of over 100% in the quarter. 

Not only are people returning to Disney properties, they're spending a lot more while they're there. The second quarter saw per-capita spending grow more than 40% over 2019. As we enter the summer travel season, there's reason to expect strong growth for the coming quarters. 

With the exception of the pandemic-induced crash in early 2020, you'd have to go all the way back to 2013 to find a time that Disney traded for a P/S multiple as low as today's 2.2. Even with the hardships the company has faced over the past few years, it's difficult to argue Disney isn't in a better place as a business than it was then.

Starbucks

When Starbucks (SBUX 0.93%) reported its earnings for Q2 2022 (ended April 3), the results were good. Revenue was up 15%, comparable store sales increased 7% globally (and 12% in the U.S.), and Starbucks Rewards memberships grew 17% year-over-year. The results look even more impressive, considering its second-largest market, China, saw comparable store sales decrease 23% due to COVID-related lockdowns. 

The company suspended guidance for the remainder of the year due to uncertainty around the COVID lockdowns in China, but management does expect there to be pressure on results for the next two quarters. On the bright side, despite a year-over-year decrease in comparable store sales, the international segment did see revenue grow 4% in Q2. 

CEO Howard Schultz also suspended the company's stock buyback plan shortly after returning to the company as Interim CEO, his fourth stint in the corner office. Johnson made this move to reinvest in the business in order to provide long-term value for shareholders. This may be what is needed considering the challenges facing the company, and it's good for the business to have a seasoned CEO at the helm to navigate this tough time.

There are absolutely some near-term challenges for Starbucks, but it is still a dominant brand with global reach. Starbucks currently has a P/S multiple of 2.9, a valuation only seen three times over the past decade, and below its 10-year average of 3.9. Starbucks also pays a dividend, with a market beating yield of 2.5%. For investors with a long-term investing horizon, now is a great time to pick up shares.