Technically stocks (https://en.m.wikipedia.org/wiki/Stocks) are attached to the feet/ankles, whereas a pillory (https://en.m.wikipedia.org/wiki/Pillory) are attached to a pole where the head and/or arms are restrained. While similar, and sometimes used in conjunction with one another, they are used to put the individual placed in them into different positions.