Kroger and Walgreens are experimenting with a program that would allow Walgreen's shoppers to pick up online orders of Kroger's groceries at some of the pharmacy's locations, the retailers announced Tuesday.

Walgreens will also start selling some of Kroger's private-label brands. The two are testing the idea at 13 Walgreens stores.

"This concept brings together the best of two great brands to rethink convenience and redefine the way America shops for food," Kroger CEO Rodney McMullen said in a statement.

The deal is the latest in a series of partnerships and combinations in which retailers have sought to offer new products and services as shopping habits change.

Pharmacies like Walgreens have been losing sales of household products like shampoo that they can buy at conveniences stores or online. Grocers like Kroger are looking to add service and distinction as they compete against the powerful union of Amazon and Whole Foods.

Examples include CVS Health's planned $69 billion acquisition of health insurer Aetna and Walmart's partnership with health insurer Anthem.

Kroger has been transforming its business to compete against the evolving retail landscape. It acquired a stake in British online supermarket Ocado in May, agreed to buy meal kit company Home Chef and launched grocery delivery service Kroger Ship.

It also plans to open an online storefront on Alibaba's platform, Tmall Global, for international brands. The focus will include dietary supplements and private label products under the brand Simple Truth.

Kroger's Simple Truth line, launched in 2012, has grown to reach $2 billion in sales.

Shares of Kroger edged up nearly 1 percent in premarket trading. Shares of Walgreens were down slightly.

WATCH: Meet Flippy, the burger-flipping robot poised to transform fast food