Same thing, different word. Look up 'Pillory' and it will also show 'Stocks'! English, a mongrel language that has to/two/too many homonyms and more words that say the same things!
The stocks have only the feet immobilized. The pillory is where you are standing but bent over, and your head and feet are immobilized.