In his comedies, Shakespeare examines another theme, love, and all the various ways that it manifests in the human experience. In A Midsummer Night's Dream, he uses another thematic proposition, illusion versus reality, to help him investigate the question of himan love and how/why we fall in and out of love.
The main device in this play, concerning love as illusion versus reality, is the love juice provided by Oberon. His interest is two-fold, to punish Titania by using it to make her believe that she is in love with a "wild thing," and also to assist the broken-hearted Helena in winning the love of Demetrius. The fickleness and the unexplained origin of a human's "falling in love" are demonstrated onstage through the power that Oberon (and Puck) wields in this regard through the juice of a flower.
Of course, since Midsummer is a Comedy, there are complications and mix-ups that must ensue, so Puck not only causes a "wild thing" (Bottom, as Puck has transformed him into an ass) to fall in love with Titania and Demetrius to fall in love with Helena, he also mistakenly causes Lysander (mistakenly) to fall in love with Helena, creating the great comic "fight scene" in the woods between the four lovers.
Illusion versus reality is also demonstrated through the references made throughout the play that remind the audience that they are participating in the theatrical world "of illusion" -- a world (unlike their everyday world of "reality")of fairies and magic in which whatever the playwright desires can happen and any mix-ups or troubles that the characters find themselves in can be made right in an instant. Voila, the magic of Theatre! At the play's end, Puck himself alludes to this contrast between illusion (theatre) and reality (the real world) with his lines:
If we shadows have offended
Think but this, and all is mended--
That you have but slumbered here
While this visions did appear.
And this weak and idle theme,
No more yielding than a dream.
For more on illusion and reality in A Midsummer Night's Dream, please follow the links below.