The pillory was a device made of a wooden or metal framework erected on a post, with holes for securing the head and hands, formerly used for punishment by public humiliation and often further physical abuse, sometimes lethal.
The pillory is related to the stocks