Pastoralism was originally a Hellenistic form, that romanticized rural subjects to the point of unreality. Later pastoral poets, such as Edmund Spenser, Christopher Marlowe, and William Wordsworth, were inspired by the classical pastoral poets.
"Pastoral" (from pastor, Latin for "shepherd") refers to a literary work dealing with shepherds and rustic life. Pastoral poetry is highly conventionalized; it presents an idealized rather than realistic view of rustic life. Classical (Greek and Latin) pastoral works date back to the 3rd century B.C., when the Greek poet Theocritus wrote his Idylls about the rustic life of Sicily for the sophisticated citizens of the city of Alexandria. In the first century B.C., Virgil wrote Latin poems depicting himself and his equally sophisticated friends and acquaintances as shepherds living a simple, rural life. Shakespeare's knowledge of pastoral conventions was drawn both from his humanist education (which included Virgil and possibly Theocritus) and from his familiarity with the works of contemporaries who imitated the ancients by writing pastoral poetry in English.
Common topics of pastoral poetry include love and seduction; the value of poetry; death and mourning; the corruption of the city or court vs. the "purity" of idealized country life; politics (generally treated satirically: the "shepherds" critique society or easily identifiable political figures). A common pastoral poetic genre is the eclogue (a dialogue between two shepherds). This conversation may be between a shepherd and the shepherdess he loves (generally his attempt to seduce her); a "singing contest" to see which shepherd is the better poet (a third may act as judge); or sophisticated banter between two supposedly "rude swains" who discuss a lady, their flocks, or a current event; lament a dead friend (a eulogy or elegy); or praise a notable individual. Laudatory poems, laments upon a death, songs of courtship and the complaints of a lovesick shepherd also occur as pastoral monologues.
An important subgroup of the pastoral eclogue or monologue is the elegy, which expresses the poet's grief at the loss of a friend or an important person. Conventional features of pastoral elegies include: the invocation of the Muse; expression of the "shepherd"-poet's grief; praise of the dead "shepherd"; invective against death; effects of the death upon nature (disruptions in climate etc. as expressions of a personified Nature's grief and sympathy); and ultimately, the poet's acceptance of the inevitability of death and hope for immortality. Pastoral elegies may also include such elements as a procession of mourners; digressions on a topical issue (frequently satirical); flower symbolism; the use of a refrain; rhetorical questions. The pastoral elegy was still practiced by 19th-century Romantic and Victorian poets; see e.g. Shelley's Adonais and Arnold's Thyrsis.
Shakespeare's contemporaries revived and imitated the topics and forms of classical pastoral poetry. For example, Christopher Marlowe's "The Passionate Shepherd to His Love," Sir Walter Ralegh's "The Nymph's Reply to the Shepherd," and Thomas Campion's "I Care Not For These Ladies" are pastoral songs of courtship and seduction. Eclogue 4 of Edmund Spenser's Shepheardes Calender (1579) and Mary Herbert's "A Dialogue Between Two Shepherds" (1599) praise Queen Elizabeth, while John Milton's Lycidas (1637) is a pastoral elegy lamenting the loss of a classmate. Both Spenser's and Milton's pastoral poems include satirical elements: Lycidas denounces the corruption of the clergy, while the Shepheardes Calender attacks those responsible for the neglect of poetry (Eclogue 10).
Renaissance poets not only imitated these classical topics and forms, they also expanded the pastoral mode to include the romance and drama. Pastoral drama and romance lacked classical models, but were strongly influenced by Italian Renaissance models, e.g. Tasso's pastoral dramatic poem Aminta (1573) and Guarini's pastoral tragicomedy Il Pastor Fido (1590). Pastoral romances of the English Renaissance include Sidney's Arcadia (1590) and Lodge's Rosalynde: Euphues Golden Legacie -- the work which supplied the story of As You Like It. Examples of English pastoral dramas include John Fletcher's The Faithful Shepherdess (Fletcher, 1579-1625, is the poet who collaborated with Shakespeare on Henry VIII and The Two Noble Kinsmen) and Ben Jonson's The Sad Shepherd (left unfinished at Jonson's death in 1637).
The affectation of rustic life in pastoral poetry is a purely artistic device; it creates a distancing effect which allows the poet to step back from and critique society. The artificiality of pastoral poetry is most explicit in the courtly language and dress of the "shepherds," which better fit the drawing rooms of polite society than the hills, swamps and sheepfolds of real rustic life. Thus, Shakespeare's pastoral comedy As You Like It contrasts the corruption of the court with the idealized Forest of Arden, in which the banished Duke Senior and his followers live a decidedly courtly existence. Note also that while Rosalind and Celia play at being shepherds, they never seem to spend any time taking care of sheep (no more than do Corin, Audrey, Silvius and Phebe). But while As You Like It is clearly pastoral in setting and themes, it transcends pastoral conventions, inviting the audience to a meditation on serious issues such as what constitutes "natural" behavior, or the connection between language and truth. On one level, As You Like It is about the power of language: it explores the ways in which figurative language or poetic conventions can help or hinder communication; the "truth" (or lack of same) of figurative speech; and the ways in which language can be abused (deliberately used to mislead; unwittingly misinterpreted; twisted in the pursuit of "unnatural" ends).