New York (CNN Business) Supermarkets are trying to entice shoppers with more than just food.

Hy-Vee is teaming up with high-intensity training gym OrangeTheory to build studios attached to two of its stores. In Morristown, New Jersey, ShopRite opened a store with a fitness studio that offers yoga and Zumba classes for its shoppers with loyalty cards. And Whole Foods' flagship store in Austin, Texas, partners with barre, spinning and yoga studios in the area for classes on its rooftop plaza.

A yoga class on the rooftop plaza at Whole Foods' flagship store in Austin, Texas.

As competition in the grocery industry stiffens , these stores hope to attract time-strapped shoppers by creating convenient experiences that shoppers can't replicate online. Grocery stores see an opening in the surging fitness industry, one of the rare business areas that has not been cannibalized by Amazon: Over the past four years, boutique studio memberships in the United States have increased by 70%, according to IHRSA, an industry trade group.

"Grocers are understanding that to bring people back in store they must create these activities," said Jamie Sabat, director of trends and consumer forecasting at consulting firm Streetsense. "They want to create this hangout factor in the store."

Although grocery tie-ups with fitness companies are still in their nascent stages, bringing on gyms makes sense for health-oriented grocers, said Diana Sheehan, analyst at Kantar Retail. She predicted that H-E-B or Meijer may add a fitness-related concept in the future. H-E-B, the cult-favorite in Texas , already sponsors free yoga in some of its stores.

Read More