Nothing justifies they type of humiliation to which the kid was subjected.
Now the child is removed, so I guess the teacher found a way.
In the meantime, the child will remember this the rest of his life. If he isn't fully anti-"socialized" by now, he is probably well on his way at the ripe old age of five.