When I was young, I helped my grandfather do it this way: take an egg, drill a hole in both ends (maybe 1/8th" diam), blow on one end to force the contents out the other. The tape one end shut. Using a small funnel, fill the egg shell with mustard powder, and tape the 2nd end closed. Repeat with 1 or 2 dozen eggs. Place these eggs in the laying boxes. ... and listen for the screaming chicken. This would break the hen(s) of the habit about 60% of the time. We left these modified eggs in the coup for a couple of years, just to catch any hen that decided to take up the habit again.
Ace is right - a hen that does this will teach the others to do it also.
Yes, hens need oyster shells mixed in their diet.
With all that said, here how I solve it today - soup pot. Period.
I'm too busy to deal with it. It's easier to hatch new chicks, than headache with re-training old hens, imo.
Alan