Walgreen Co agreed to reform its advertising practices and pay $500,000 to settle allegations its Walgreens and Duane Reade stores in New York overcharged consumers at the register and used price tags that fooled them into thinking they were getting great deals.

The settlement with the largest U.S. drugstore chain, a unit of Walgreens Boots Alliance Inc, was announced on Thursday by state Attorney General Eric Schneiderman.

It ends a two-year probe into pricing practices at the 251 Walgreens and 214 Duane Reade stores in New York.

Walgreen, which is based in Deerfield, Illinois, did not admit or deny wrongdoing in agreeing to settle.

Schneiderman said the stores often charged consumers higher prices at the register than shown in print ads or on shelf tags, including tags featuring prices that had expired.

RELATED: Volkswagen to offer to buy back nearly 500,000 U.S. diesel cars: Report

He also said stores touted some items as a "smart buy" or "great buy" while selling them at retail prices, and promoted other items as "last chance" or "clearance" despite keeping them on shelves as long as 10 months.

Walgreen was also faulted for using the words "like paying" and "like buying" to suggest that consumers were getting immediate discounts, when they were actually getting discounts that could be used only on future purchases.

Thursday's accord requires Walgreen to remove stale shelf tags within 36 hours; restricts the use of "smart buy," "great buy," "like paying" and "like buying"; and ends the use of "last chance" or "clearance" tags to promote items that are neither.

It also requires external audits of stores, and fines when stores fail two in a row. Employees will also get more training.

Walgreen spokesman Phil Caruso said the company has already made many of the required changes.

Last September, Missouri Attorney General Chris Koster also accused Walgreen of failing to remove expired price tags.

Three months earlier, it agreed to pay $2.55 million to settle an unrelated New York probe into improper Medicaid billings.