Written versions of Shakespeare's plays appeared in a variety of forms.
It is certain that he did not seek to have his plays published as books. (He did actively pursue the publication of his longer poems and his sonnets).
Quartos were small and cheaply made: they usually featured only one play. These may have been written from memory by someone close to the players. In some cases there is evidence that sections were omitted or have otherwise been poorly transcribed -- resulting in bad quartos.
Many of his plays were published in quarto form in his lifetime, but there is no evidence that he approved of or benefited from their sale and distribution.
Folio editions were very expensive to make and they were usually created for deceased famous authors. They were masterpieces of the bookmaker's art and contained many of the plays attributed to the playwright. The first folio of Shakespeare's was published seven years after his death.
Visit The Rare Book Room to see some of the oldest and rarest versions of Shakespeare's plays.