Its venture with Alibaba mimics Luckin Coffee, a Chinese upstart that opened this year and is challenging Starbucks by delivering coffee ordered over a mobile phone app.

"In some ways this is rocket fuel for our digital flywheel strategy in China," Starbucks CEO Kevin Johnson said at a press conference in Shanghai .

Starbucks, which opened its first mainland China location in 1999, has 3,400 outlets in 140 Chinese cities but faces intense competition. The company said in its latest quarterly results Chinese sales declined 2 percent.

Alibaba is the world's biggest e-commerce company by total value of the merchandise sold across its platforms. The bulk of those sales are business-to-business, but the company is increasingly expanding into consumer-oriented services.

The companies said their partnership will give Starbucks access to Alibaba's consumer platforms including food delivery service Ele.me and online supermarket Hema.

"We are breaking the physical and virtual barriers between the home, office, in-store and digital space," the CEO of Starbucks China, Belinda Wong, said in a statement.