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.