LONDON—A man strolled down the candy aisle of a grocery store in England last month, picked up a bar of chocolate and stashed it in his back pocket. He wasn’t stealing. Specially equipped surveillance cameras were tracking both his body and the products he was taking off the shelves, to help him pay for them.

Tesco PLC, one of the world’s largest supermarket operators, demonstrated this technology recently to investors, labeling it as one of the retailer’s big ideas for making shopping at its physical stores more convenient. Tesco is one of several grocers testing cashierless stores with cameras that track what shoppers pick, so they pay by simply walking out the door.

The retailers hope the technology—similar to that pioneered by Amazon.com Inc. in its Amazon Go stores in the U.S.—will allow them to cut costs and alleviate lines as they face an evolving threat from the e-commerce giant.

European efforts to scale up the technology in traditional stores—economically and without upsetting privacy advocates—will likely be closely watched in the U.S. Grocers in the U.K. often pioneer new technology like online delivery and self-payment kiosks that their American peers eventually adopt. For instance, Kroger Co. last year hired Britain’s Ocado Group PLC to build an automated warehouse filled with robots to fulfill home deliveries.

“People [in the U.S.] will definitely take note of Tesco’s experimentation, if only because it shows that someone outside of Amazon is now testing the concept,” said Chris Walton, a former Target Corp. executive and founder of consulting firm Red Archer Retail.