Some hens will do this, and once they get a taste of it, sometimes you won't be able to get them to stop aside from culling her or selling her to someone else.
I have used golfballs, plastic eggs, terra cotta eggs, eggs filled with everything under the sun (hot sauce, pepper etc) and some birds will not stop no matter what you do.
However, it could be a vitamin deficiency, and I have successfully stopped a few hens from doing it by boiling up and feeding her as many eggs as she will eat, every day, for a week and sometimes, that will get them to eventually quit.
The problem with the above post is some hens are not as stupid as we think they are. Once a hen lays an egg, it is warm and then they turn around and eat it as soon as its laid. No amount of golf balls will help them when they are smart enough to know which "golf ball" is still warm as it just popped out of her.