CHICAGO — By selling directly to Chinese consumers on Alibaba’s platform, a move announced last week by the American retailer Costco Wholesale, it aims to employ local knowledge and a low-cost structure to avoid missteps that caused even Walmart, the world’s largest retailer, to stumble in China.

Many global retailers opening in China have struggled to find product mixes and store designs that appeal to local customers. In addition to Walmart, others like Best Buy and eBay have fallen short of expectations in one of the fastest-growing consumer markets.

Costco’s virtual storefront on the Alibaba site Tmall is designed to help the company study consumer shopping habits with no brick-and-mortar costs and fewer risks, signaling a new approach to expanding in China.

“This shows Costco has learned from the mistakes made by companies like Walmart and also those who were forced to exit the market, like Home Depot,” said Anjee Solanki, national director of retail services at Colliers International, a commercial real estate company.