Before Mary Shelley, nee Godwin, married Percy Bysshe Shelley, she traveled with him and a number of his writer friends to the Alps. She was but sixteen years old at the time. While there, Lord Byron, a member of the party and a rather infamous poet of the era, challenged each member of the group to write a horror story to see who could write the most compelling one. This challenge prompted young Mary to begin the story of Victor Frankenstein and his creature. Thus, this small group of friends and her future husband were the initial audience for the story.
However, Shelley addresses the clash between Enlightenment and Romantic ideas, writing a story that seems to function as a cautionary tale against certain kinds of medical experiments. At the very least, Frankenstein suggests that there is a line scientists and doctors ought not to cross and that when they attempt to play God—as Victor Frankenstein does—they could lose their very humanity and endanger the human race.
In the novel's preface, Shelley writes that she wants to "preserve the truth of the elementary principles of human nature," implying that our duty toward one another and our desire for love and companionship are far more integral to our natures than scientific exploration. She seems to caution us to be careful with one another and to recognize that we have some negative impulses as well, like those that might compel us to judge others harshly based on their appearance, so that we can control them.