This is a great question - the shock in this modern Gothic tale lies in the "sting in the tale," which surprises and shocks us terribly the first time we read the story. Jackson of course uses this shock tactic to communicate her message about the danger of unthinking allegiance to traditions that can cause us to commit completely inhumane acts of barbaric brutality. However, on re-reading this story, it is well worth considering how she uses foreshadowing to achieve this dramatic ending.
Notice how Jackson deliberately puts us off guard by her description of the lovely summer day. This setting stands at complete odds with the violent conclusion to this story. Then note how the boys are mentioned gathering stones:
Bobby Martin had already stuffed his pockets full of stones, and the other boys soon followed his example, selecting the smoothest and roundest stones; Bobby and Harry Hones and Dickie Delacroix - the villagers pronounced the name "Dellacroy" - eventually made a great pile of stones in one corner of the square and guarded it against hte raids of the other boys.
We associate gathering stones as a normal activity for boys to engage in - we never would suspect the brutal way that they will be used at the end of the story.
This is one of the first examples of foreshadowing that you would do well to think about and analyse further. You will also want to re-read the rest of the story and consider what hints Jackson plants that raise suspense and contribute to the shocking ending. Good luck!
Jackson's use of foreshadowing is powerful and well-played in The Lottery. Yes, as discussed above, the beautiful day and the seemingly innocent gathering of stones by the boys (notice that it's the boys who gather stones - something we'd associate with boys, not girls), and the general harmonious mood of everyone, definitely lead us to believe that something wonderful is about to occur. Further, Tessie Hutchinson's arrival and her seemingly scatterbrained attitude, mingled with excitement, further mislead the reader. However, Jackson also gives us other clues - the predominance of black (the box, the black spot on the paper, even the names of certain people), not to mention the general air of nervousness and discomfort among the villagers as the story progresses all serve as foreshadowing.
One of the most disturbing aspects is that at the end of the story, when the reader begins to realize that something is VERY wrong, someone hands little Davy Hutchinson some pebbles - the thought of a 4/5 yr. old child throwing stones at his mother is anathema to us as readers. Yet Jackson presents us with this line as a further foreshadowing of the horror to come, as well as a comment on how no one is exempt.