"All the world's a stage/ And all the men and women merely players" (2.7.9). So says Jaques, just one of many characters played by actors performing on a literal stage in As You Like It. Shakespeare is famous for his self-referential drama and As You Like It takes every opportunity to remind us of the theatrical nature of human life.
The play also explores other related art forms – love poetry, licensed "fooling," dancing, and singing. These performances are clearly meant to entertain the audience, but Shakespeare also considers the nuances of the kinds of art that comes naturally to us, such as writing poetry for a lover, singing a song to cheer a friend, or even donning a disguise while "play-acting." Art isn't always just a mirror of life; in the best cases, it's the stuff of life itself.
When Rosalind disguises herself as "Ganymede," we're reminded of the circumstances of Shakespeare's "transvestite" theater, whereby actors played the roles of women characters, who sometimes cross-dressed (as is the case with Rosalind/Ganymede).
As You Like It critiques the genre of Petrarchan poetry, even while Shakespeare the poet/playwright participates in it.