Walgreen Co posted a slightly lower quarterly profit as shoppers remained focused on buying only necessities.

The drugstore chain earned $522 million, or 53 cents per share, in its fiscal third quarter ended May 31, compared with a profit of $572 million or 58 cents per share, a year earlier.

Walgreen is cutting jobs, opening fewer stores than originally planned and revamping with a smaller selection of items as part of its plans to return to double-digit earnings per share growth under a new chief executive.

Sales rose 8 percent to $16.21 billion, while sales at stores open at least a year rose 2.8 percent.

Shares of Walgreen have jumped 27 percent so far this year, while shares of rival CVS Caremark Corp have risen 10.5 percent.

(Reporting by Jessica Wohl, editing by Dave Zimmerman)