IKEA is testing two new store designs that rip up the blueprint of its signature maze-like showrooms, as the retailer explores how to keep physical locations relevant in the age of e-commerce.

Ingka Holding B.V., which operates the majority of IKEA’s retail stores, this month reopened a location in the Xuhui district of Shanghai that was renovated to test its “future store format,” a space where visitors can conceivably spend hours doing things other than shopping. Alongside showrooms and a shop for small items is a cushioned, theater-like space where IKEA hopes people will hang out with friends, a restaurant that showcases sustainable food practices such as urban farming, and a “Maker’s Hub” where staff help customers repair old and build new items.

IKEA remodeled its location in the Xuhui district of Shanghai to test the company's ‘future store format.’

Photo: IKEA

The retailer on Thursday will also open a new compact store in Vienna. Located next to the large Westbahnhof train station in the Austrian capital, the store will encompass five stories and a rooftop cafe. There is no parking lot, unlike at IKEA’s usual, sprawling installations far from city centers. Accessories and smaller furniture can be carried out, and larger items can be ordered for next-day home delivery.

In both spaces, customers can use their phones to scan items for purchase as they walk around. And they can take any route through the stores that they please.

“We wanted to basically start from scratch and say, how could we imagine a store of tomorrow, the store where the customer is not going anymore to just buy a Billy bookcase?” said Stefan Vanoverbeke, IKEA’s global deputy retail manager, referring to one of the chain’s products.

Both store designs were conceived before the Covid-19 pandemic began. Shanghai was chosen as the location of the future-store pilot because many of its customers already shop using smartphones, whereas the opening in Vienna comes as part of IKEA’s push into city centers. The retailer in June opened a store selling small accessories and furnishings on Paris’s Rue de Rivoli.

IKEA's city center store in Vienna spreads across five stories and features a rooftop cafe.

Photo: IKEA

IKEA is aware that a growing group of customers prefer to order their items online, or they have to because they don’t own a car to transport heavy flat-pack furniture to their urban apartments, Mr. Vanoverbeke said. But that leaves it with an existential dilemma to solve: “So, why would you go to IKEA?”

It is a question a number of retailers are grappling with as the pandemic pushes more customers toward online shopping and away from malls and city flagship stores. Lego Group and Dick’s Sporting Goods Inc. have opened stores where commerce is accompanied by activities such as augmented reality games and rock-climbing walls.

IKEA was slow to embrace e-commerce before the pandemic, and its online ordering system frustrated some customers during lockdowns last year. Its new store formats aim to do more than entertain by combining a more sophisticated e-commerce offering and typical showrooms with spaces that invite customers to linger and think more about home furnishings than they did previously.

“I’m convinced that if we do our job in a good way, we’ll make home furnishing more important for people,” Mr. Vanoverbeke said.

Counterintuitive though it may seem, part of furniture giant IKEA’s success stems from its policy requiring its customers to build its products. In this video, WSJ explains the behavioral psychology behind the “IKEA effect.” Photo: Isopix/Zuma Press The Wall Street Journal Interactive Edition

IKEA’s traditional one-way showroom system was designed to make customers consider nearly every item that its stores carry, even if they only came in to purchase that one Billy bookcase. The new stores instead let customers pick up or order what they came for, browse if they want to, but also leave without having to navigate around other products and room sets.

Mr. Vanoverbeke said inviting spaces like the Shanghai Maker’s Hub and Vienna’s rooftop restaurant will act as alternative, less transactional ways to keep customers in-store.

The arrival of the new formats don't spell the end of out-of-town showrooms and their signposted shopping routes, Mr. Vanoverbeke said. IKEA will assess sales figures and collect feedback from customers online and in-person at the new stores to determine which aspects of the new designs work, which don’t, and which need more development.

“Based upon that, we will decide which parts we feel are ready to be rolled out in other stores,” Mr. Vanoverbeke said. IKEA is more likely to add certain elements from the new formats to existing floor plans than to renovate stores into carbon copies of Shanghai, he added.

Any changes to stores in other markets, including the U.S., will be rolled out in the next few years, Mr. Vanoverbeke said.

Write to Katie Deighton at katie.deighton@wsj.com