Did people speak the same as Shakespeare in his plays?
Did Shakespeare write his plays to mimic the way people in Elizabethan England spoke?
No, for the most part at least, Shakespeare is not mimicking the voices of people living in Elizabethan England in his plays. Shakespeare wrote his plays primarily in blank verse, which is the name for poetry written in unrhymed iambic pentameter. Although iambic pentameter closely mirrors the sounds and cadences of spoken English, average people in Shakespeare's day did not talk like, say Portia does in Act IV, scene i of The Merchant of Venice.
The quality of mercy is not strain'd,
It droppeth as the gentle rain from heaven
Upon the place beneath: it is twice blest;
It blesseth him that gives and him that takes:
'Tis mightiest in the mightiest: it becomes
The throned monarch better than his crown
The upper classes of English society did speak very formally, but they would not have paused to make sure that they were speaking in iambic pentameter. However, as you can see in this excerpt from a speech by Queen Elizabeth I, for whom the Elizabethan Age is named, sentence structure was often different from that used today in modern spoken English.
My loving people, we have been persuaded by some, that are careful of our safety, to take heed how we commit ourselves to armed multitudes, for fear of treachery; but I assure you, I do not desire to live to distrust my faithful and loving people. Let tyrants fear; I have always so behaved myself that, under God, I have placed my chiefest strength and safeguard in the loyal hearts and good will of my subjects. And therefore I am come amongst you at this time, not as for my recreation or sport, but being resolved, in the midst and heat of the battle, to live or die amongst you all; to lay down, for my God, and for my kingdom, and for my people, my honor and my blood, even the dust. http://www.historyplace.com/speeches/elizabeth.htm
You can see that Queen Elizabeth I uses elaborate sentence structure to get her point across; she uses many clauses in her sentences, and she does not stick to a subject-verb-object construction, and that may seem complicated to students today.
Its not that Shakespeare was trying to sound fancy, or that he was trying to confuse the people who came to his plays, instead he wrote dialogue for upper-class characters that sounds very upper-class. You may want to note that many of Shakespeare’s lower-class characters do not speak in iambic pentameter at all. Lower-class people wouldn’t have spoken in an elevated way, so Shakespeare writes their dialogue to match their speech patterns, as you can see in an excerpt of a monologue spoken by Launcelot Gobbo in The Merchant of Venice:
The fiend is at mine elbow and tempts me, saying to me, 'Gobbo, Launcelot Gobbo, good Launcelot,' or 'good Gobbo,' or 'good Launcelot Gobbo -- use your legs, take the start, run away.' My conscience says, 'No. Take heed, honest Launcelot; take heed, honest Gobbo,' or as aforesaid, 'honest Launcelot Gobbo -- do not run; scorn running with thy heels.'