Yamkala Sapkota's doomed efforts to get on the road had placed a burden on the family's finances and she had rowed with her husband.
The 30-year-old doused her clothes in white spirit and set herself alight after leaving a suicide note penned in her native Nepalese, saying she no longer wanted to live.
A neighbour was alerted and made a 999 call and firefighters using breathing apparatus managed to rescue the semi-conscious woman, who had suffered burns to her face, back and arms, from her flat in Gordon Street, in the Leith area of Edinburgh.
Sapkota earlier admitted culpably and recklessly starting the fire, severely injuring herself and endangering the lives of others and property on June 28 last year.
At the High Court in Edinburgh judge Lord Bannatyne told her: "I have decided to take the unusual course in a High Court case and to defer sentence for one year for you to be of good behaviour."
The judge said it would also allow her to show that it really was wholly out of character for her.
He told her if she did behave he intended to deal with her in a non-custodial manner, probably by admonishing her.
Defence counsel Sarah Livingstone said Sapkota had described herself as being out of her mind.
She said: "In her state of mind she was trying to harm herself and no-one else."