The pastoral idyllic poem originates with Greek poet Theocritus and idealizes the simple rural life of shepherds and other people who dwell in the countryside and live their lives close to nature and the ways of nature. Shakespeare's As You Like It is an oft cited example of the pastoral theme in drama (Wordsworth's Michael: A Pastoral Poem is an oft cited pastoral in poetry). As the University of Victoriaexplains it, the features of pastorals are country life, a comparison to city life, shepherds, living close to nature, simple happiness, contentment, plentiful fruits of nature.
As You Like Itcontains these features on several levels. First, the majority of the play takes place in Arden Forest with shepherds as some of the minor characters--who nonetheless guide plot development and character development in several major characters--and with exiles living in abundance off the goodness of the fruit of the land, all of whom have a simple happiness that brings good and contentment. Second, pastoral features apply to Rosalind and Celia who settle in a pastoral setting and find their opportunities expanded in a way that was never possible, despite their privileges, at court. This expansion of opportunity is true for all the court characters who come to Arden's pastoral life from Duke Frederick to Oliver to Touchstone to Orlando.
Pastoral features are instrumental in plot and character development in regard to several characters: Rosalind, Touchstone, Celia, Duke Senior, Duke Frederick, Phebe, and others. In each case, the idllyc country life materially alters a characters life choices and/or opportunities. Using Duke Frederick as an example, his encounter with unexpected power in the pastoral has convinced him to enter the most pastoral of occupations and joins a monastary to pursue the divine, thoughtful life. Using Oliver as another example, Oliver has an enlightening experience (an epiphany) and, while choosing Celia for a wife, also chooses, along with her, to abandon court life and adopt a pastoral life with Celia's sheep herd offering the perfect pastoral element to their happiness.