In Act II of Hamlet, Rosencrantz and Guildenstern act as foils for Polonius, whom Hamlet has just dismissed, and Horatio. Whereas Hamlet trusts Horatio as his only friend in the play, Hamlet resents the King's spies Polonius and Rosencrantz & Guildenstern. As a result, he acts "crazy" (antic and sarcastic) toward them, knowing they will report his odd behavior back to the King.
Hamlet calls his two (former) friends Rosencrantz and Guildenstern:
Later, after the play-within-the-play, Hamlet will call them "players," although he never uses the word, per se:
Why, look you now, how unworthy a thing you make of
me! You would play upon me; you would seem to know
my stops; you would pluck out the heart of my
mystery; you would sound me from my lowest note to
the top of my compass: and there is much music,
excellent voice, in this little organ; yet cannot
you make it speak. 'Sblood, do you think I am
easier to be played on than a pipe? Call me what
instrument you will, though you can fret me, yet you
cannot play upon me.