Shares of Walgreens plunged more than 14% on Thursday after the retail pharmacy giant reported fiscal third-quarter earnings that fell short of expectations and slashed its full-year adjusted profit outlook, citing a "challenging" environment for pharmacies and U.S. consumers. The company now anticipates fiscal 2024 adjusted earnings of $2.80 to $2.95 per share, down from its previous forecast of $3.20 to $3.35 per share.

"We assumed ... in the second half that the consumer would get somewhat stronger," Walgreens CEO Tim Wentworth told CNBC. "But that is not the case." He added, "The consumer is absolutely stunned by the absolute prices of things, and the fact that some of them may not be inflating doesn't actually change their resistance to the current pricing. So we've had to get really keen, particularly in discretionary things."

Despite topping revenue estimates for the quarter, Walgreens is grappling with a difficult retail environment and weak consumer spending. The company reported revenues of $36.4 billion for the quarter, a 2.6% increase from the same period last year. However, its net income was $344 million, or 40 cents per share, up from $118 million, or 14 cents per share, a year ago. Excluding certain items, adjusted earnings were 63 cents per share, falling short of the expected 68 cents.

The health-care segment stood out with notable growth, as sales jumped 7.6% year-over-year to $2.13 billion. This performance was driven by primary care provider VillageMD and specialty pharmacy company Shields Health Solutions, with the latter seeing a 24% sales increase. Specialty pharmacies are crucial for delivering medications requiring unique handling, storage, and distribution, often for patients with complex conditions such as cancer and rheumatoid arthritis.

However, the company's overall financial health remains precarious. Walgreens has been working to slash costs following a rocky year marked by low pharmacy reimbursement rates, weakening demand for COVID-19 products, and broader macroeconomic challenges. As part of its cost-cutting efforts, the company announced it would simplify its U.S. health-care portfolio and finalize plans to close underperforming U.S. stores over multiple years. "Seventy-five percent of our stores drive 100% of our profitability today," Wentworth said. "What that means is the others we take a hard look at, we are going to finalize a number that we will close."

This strategic shift reflects Walgreens' ongoing transformation from a major drugstore chain into a comprehensive health-care company. However, the transition has not been without its setbacks. The company posted a steep net loss in the previous quarter, recording a nearly $6 billion charge related to the decline in value of its investment in VillageMD. Executives announced plans to shutter 160 VillageMD clinics during the fiscal second-quarter earnings call in March.

"We are working with their management team to ultimately still be an investor, but meaningfully reduce our investment as well as gain some liquidity so that we can invest back in the retail pharmacy business that represents our future," Wentworth told CNBC about the company's investment in VillageMD.

Walgreens' U.S. retail pharmacy segment, which operates more than 8,000 drugstores across the country, generated $28.5 billion in sales in the fiscal third quarter, a 2.3% increase from the same period last year. This segment saw pharmacy sales rise 4.4% and comparable pharmacy sales increase 5.7%, driven by price inflation in brand medications and prescription growth. Total prescriptions filled in the quarter, including vaccines, totaled 306.4 million, a 0.5% increase year-over-year. However, retail sales fell 4%, with comparable retail sales declining 2.3%, highlighting the challenging retail environment.

Internationally, Walgreens' segment, which includes more than 3,000 retail stores abroad, posted $5.73 billion in sales, a 2.8% increase from the previous year. The company reported a 1.6% sales growth from its U.K.-based drugstore chain, Boots. Although there were reports of potential plans for an initial public offering of the subsidiary, Wentworth confirmed that Walgreens has no plans to sell the chain. "Right now, there's no question Boots is a major contributor to us," he said.