Rosencrantz and Guildenstern are two of Hamlet’s friends that King Claudius enlists to observe Hamlet’s behavior. The King sees that Hamlet has been acting oddly, so he turns to these two men whom he believes he can trust to discover the cause of Hamlet’s behavior. He tells them that Hamlet
hath much talk’d of you;
And sure I am two men there are not living
To whom he more adheres.
Rosencrantz and Guildenstern quickly agree to help the king and “lay our service freely at your feet, / To be commanded.”
Hamlet, however, is smarter than the king anticipated. When his friends visit, Hamlet questions their motives and does not believe their answers. He refuses to tell them where he hid Polonius’s body, nor does he trust them when they later accompany him to England, as Claudius has commanded for fear of Hamlet’s reprisal.
Claudius gives a letter to Rosencrantz and Guildenstern to carry to England. Unbeknownst to them, the letter instructs that Hamlet is to be killed upon his arrival in England. Upon discovering the contents of the letter, Hamlet replaces it with one calling for Rosencrantz and Guildenstern to be killed. There is no thought of friendship anymore; Hamlet knows his friends have betrayed him by becoming spies for Claudius.
Ultimately, Rosencrantz and Guildenstern are killed when pirates overtake the ship. Hamlet feels they brought their own destruction. He remarks,
they did make love to this employment;
They are not near my conscience; their defeat
Does by their own insinuation grow.