Shakespeare employs a few techniques when building this motif of corruption. Corruption and its partner, disease, is one of the most overarching motifs we see in the play. An examination of the characters' dialogue reveals the heavy use of imagery to underscore Hamlet's frustration about the state of Denmark and the players therein.
There is something rotten in the state of Denmark (1.4)
Here Marcellus, not Hamlet as many misquote, is commenting about the riotous revelry ensuing at the midnight hour in the castle. His frustration and disgust at King Claudius's new reign are apparent. He implies, through his appeal to the olfactory sense, that Denmark has fallen into a state of rot and putrescence through the moral corruption of the king and his new queen.
Imagery is Shakespeare's primary technique for expressing corruption. When examining the branch of physical corruption, that of sexual immorality, in the relationship of Claudius and Gertrude, he also explores moral corruption in those who have any contact with Claudius, as he manipulates and pulls all who are under his rule away from their moral compass. Hamlet says of Claudius that he is a "canker in our nature" that is destroying the beloved legacy of Hamlet senior.
Additional images of maggots or worms feeding on flesh, talk of poison and its effects on the body, and numerous comments about disease riddle the play, making corruption a primary focus of Shakespeare's famous work.