For a week in May, some of Instagram's designers, engineers and product managers met not at the company's Menlo Park, California, headquarters but at a rented house, stocked with grocery store snacks. There, away from computers and armed with pencil and paper, they explored a question important for the photo-sharing app's future: how do we get our users to shop?

In particular, they wanted to figure out how to introduce shopping tools without making them so obvious that they would transform the app into a splashy catalog. Together they came up with 150 ideas. After an extensive process of elimination, the team settled on the design being unveiled this week: letting brands tag products in their photos, the way users tag their friends. Tap on the tagging descriptions to get more information, tap again to buy on the retailer's site.

It's the first test from Facebook Inc.'s Instagram to kick off a broader strategy for helping people pick out and buy things, according to James Quarles, Instagram's vice president of monetization. The team will gather data from users' behavior to figure out what to do next. Maybe they'll add a way to comparison shop, a way to search for products elsewhere on the app or even a Pinterest-like feature to save posts that inspire, he said.

"We are so well-positioned in this space," Quarles said. "Instagram is super visual, we have a well-defined graph of your interests based on what you're following, and the serendipity of discovery happens every day through the ad products and who you follow."

People have long been shopping on Instagram without a formal way to buy things. A crop of influencers on the photo app push fashions into popularity. Company researchers have noticed that users take screenshots of products they love, or direct-message them to themselves. But, like the design team's caution suggests, making shopping an actual app feature is a risky proposition.

The main problem: shopping hasn't worked well in social media. Facebook's history is peppered with discontinued e-commerce products, like birthday gifts for friends and "Facebook credits," which was a virtual currency for social games. The company recently introduced a Marketplace product that allows people to buy and sell to each other, but its launch was quickly marred when users started posting ads for drugs, sex and exotic animals.

Twitter tested a "buy button" for more than a year, but the project faded and the head of e-commerce departed. Pinterest made a bigger investment in shopping, allowing direct buying on its site from thousands of retailers, but it's still unclear how popular the tool is with consumers.

Quarles said Instagram aims to learn from all these experiences—especially from its parent company, Facebook, which has shared its notes.

Instagram already lets retailers promote products in ads, but the shopping update would apply to regular posts, making it a more natural experience for users. The app's e-commerce ambitions are large—including international expansion and a video version of the product—but they're starting small. It's testing its new feature with just 20 brands, including Kate Spade and Warby Parker, and not taking any cut of the proceeds.