A Doll's House is one of Ibsen best-known and well-received plays—though this was not the case when it was first presented on stage. However, it wasn't long before the demand to see the play increased throughout Europe. And although Ibsen insisted this was not a play written about women's rights, but about human rights, as with any piece of art, it took on a life of its own when released to the world.
Foreshadowing is when the author provides information as to what is going to happen later in the story (or play), but it is generally not recognized until the event takes place.
An example of foreshadowing can be found at the beginning of the play, when Nora has been shopping. Torvald says she should be careful in spending. As a father would instruct a child, he reminds her that if he borrows to pay for things and something happens to him, what would happen to the person he had borrowed from? Nora explains that she wouldn't care about that person.
If anything so awful happened, then it just wouldn't matter if I had debts or not.
Well, but the people I'd borrowed from?
Them? Who cares about them? They're strangers.
This foreshadows Nora's debt with Krogstad, a semi-shady man that she borrowed money from when Torvald was ill and could only be saved by moving to a warmer climate. She forged an I.O.U. with her father's signature. (Women were not allowed to borrow money.) While she has no regard for Krogstad, his threats will soon pressure Nora and cause her to re-evaluate her marriage and her life.
Another example of foreshadowing is found very soon after, as Torvald, acts as if borrowing money is a sin:
Nora, Nora, how like a woman!...No debts! Never borrow! Something of freedom's lost—and something of beauty, too—from a home that's founded on borrowing and debt.
This foreshadows Torvald's initial response when he learns that Nora took a loan from Krogstad. He does not care that it saved his life. He hates Krogstad and first worries about being in debt to him. He is also concerned about his reputation—if word gets out. He has no appreciation for Nora's actions, but treats her like filth. He refuses to let her care for the children anymore—until he learns that Krogstad has returned the I.O.U., with no further plans to pursue the matter.
Lastly, Nora speaks of the miracle she expects to occur when it comes out that she borrowed the money, as Krogstad has threatened to expose her for her forgery. She believes that her husband will be noble and sacrifice himself to save her—though she will not allow such a thing. She is actually ready to take her own life rather than let Torvald shoulder any of the blame. It seems that he might when he says:
...time and again I've wished you were in some terrible danger, just so I could stake my life and soul and everything, for your sake.
However, when the time comes for Torvald to do just that, he fails Nora when she needs him most. The miracle is not what Nora expected. The miracle is that she finally sees Torvald for who he is:
I've loved you more than all this world...
...You stay there and give me a reckoning. You understand what you've done?...
Yes. I'm beginning to understand everything now.
What she understands is that she has been living a lie, loving a man who has no capacity to appreciate her as a person, or love her as a man should love his wife—not treating her like a child, but as a partner; appreciating her sacrifices for him.