How is 'As You Like It' a pastoral play?
Pastoral literature celebrates the freedom and purity of life outside the city, in the rural areas. Unlike in real life rural areas, characters in a pastoral play don't need to work hard all day on a farm or go hungry when the rains don't come. The genre glorifies country life as a refuge from the corrupt society of city life, showing the love affairs and antics of shepherd and shepherdesses who lounge on sunny hillsides all day, constructing love poems and enjoying nature's bounty. As you can see, it's a bit unrealistic and silly, but it has always been a popular genre with poets and playwrights.
As You Like It both mocks and is itself a pastoral play. Though the shepherds themselves are minor (and comic) characters, their actions influence the changes and lives of the main characters. Additionally, the main characters are all of noble birth, coming from the corrupt city, where their fortunes have gone sour, to the grace of the forgiving countryside. Only in the natural world can these nobles experience the freedoms and opportunities denied to them at court: Rosalind can woo and marry Orlando, the banished Duke Senior makes his own court in the forest, where he and his merry men feast and make music and enjoy the bounty of nature, etc.
Additionally, the experiences they have in the natural world fundamentally changes each of the characters for better. Duke Frederick has an encounter that causes him to give up his ill-gotten power and join a monastery. Duke Senior discovers the joys of a simple life in the wood after his brother banished him there. Oliver has an epiphany and chooses to leave the court and live with Celia in Arden, herding sheep. These examples demonstrate the theme of nature as a healing and nurturing force. At the same time, the improbability of some of these plots mocks the very same theme, and the pastoral genre as a whole.