In Letter 4, Captain Robert Walton tells Victor he is on a quest for knowledge, a quest where
One man’s life or death were but a small price to pay for the acquirement of the knowledge which I sought, for the dominion I should acquire and transmit over the elemental foes of our race.
Walton is extremely ambitious and seeks power through scientific knowledge and exploration, a trait he and Victor seem to share. Notably, Walton seems to value his ambitions and intellectual interests more than human life. Victor reacts to this extreme commitment with horror, however.
Walton’s words, unbeknownst to him, foreshadow the story Victor is about to tell him, a tragedy caused by his reckless use of science. After creating the Monster, Victor flees in fright, prejudiced against the Monster's appearance. This creates a cycle of guilt, anger, and destruction in which the Monster takes vengeance on Victor and Victor, in turn, swears vengeance on the Monster. By the end of the novel, both Victor and the Monster have become “true monsters,” their innocence destroyed. So, though Captain Walton doesn't yet know it, his words anticipate the price—a terrible one, not a "small" one—that an unrestrained quest for scientific dominion can demand.
An instance of foreshadowing occurs in Chapter 5, when Victor has a vivid, terrifying nightmare of his wife Elizabeth:
I saw Elizabeth, in the bloom of health, walking the streets of Ingolstadt. Delighted and surprised, I embraced her, but as I imprinted the first kiss on her lips, they became livid with the hue of death; her features appeared to change, and I thought that I held the corpse of my dead mother in my arms; a shroud enveloped her form, and I saw the graveworms crawling in the folds of flannel [...] I beheld the wretch - the miserable monster whom I had created.
Moments later, Victor wakes up and sees “the miserable monster” he has created. The vision of the Monster following the image of Elizabeth dead hints at her murder, which occurs later on in the novel. Completely isolated from society due to the prejudice he experiences, the Monster becomes consumed by violence and rage. The Monster eventually seeks vengeance against Victor, first killing his beloved brother William and finally Elizabeth on her and Victor’s wedding night. Through this tragedy, Shelley suggests prejudice is a persistent and destructive aspect of human nature. Nearly every person the Monster encounters—save the blind man De Lacey—reacts to him with fear or violence. This experience convinces the Monster of “the barbarity of man.” The horrifying image of Elizabeth in Victor's dream foreshadows this grisly downward spiral.
An instance of foreshadowing occurs in Chapter 8, during Justine’s trial for the murder of Victor’s brother William. Victor solemnly thinks:
It was to be decided whether the result of my curiosity and lawless devices would cause the death of two of my fellow beings: one a smiling babe full of innocence and joy, the other far more dreadfully murdered, with every aggravation of infamy that could make the murder memorable in horror.
The Monster is the actual murderer. However, Victor keeps this fact to himself during the trial, aware that he is unlikely to be believed. He also can't confess in Justine's place as he wishes he could, since he wasn't present when the murder occurred. Furthermore, Victor feels directly responsible for his brother's death and describes Justine as if she is already dead. As his thoughts of Justine's death foreshadow, Justine is soon pressured to confess, convicted of murder, and ultimately punished by death.
Significantly, Victor attributes both the murder of his brother and the execution of Justine to his own boundless ambition and insatiable thirst for knowledge, errors that are costly, resulting in the deaths of the people who are dearest to him. Victor's "curiosity" and "lawless devices" have horrible consequences foreshadowed by his fretful musings during the trial.