Polly Milton, a 14-year-old country girl, visits her friend Fanny Shaw and her wealthy family in the city for the first time. Poor Polly is overwhelmed by the splendor at the Shaws' and their urbanized, fashionable lifestyles, expensive clothes and other habits she has never been exposed to, and, for the most part, dislikes. Fanny's friends ignore her because of her different behavior and simple clothing, Fanny's brother Tom teases her, and Fan herself can't help considering her unusual sometimes. However, Polly's warmth, support and kindness eventually win the hearts of all the family members, and her old-fashioned ways teach them a lesson.
Over the next six years, Polly visits the Shaws every year and comes to be considered a member of the family. Later, Polly comes back to the city to become a music teacher and struggles with professional issues and internal emotions. Later in the book, Polly finds out that the prosperous Shaws are on the brink of bankruptcy, and she guides them to the realization that a wholesome family life is the only thing they will ever need, not money or decoration.
With the comfort of the ever helpful Polly, the family gets to change for the better and to find a happier life for all of them. After being rejected by his fiancĂŠe, Trix, Tom procures a job out West, with Polly's brother Ned, and heads off to help his family and compensate for all the money he has wasted in frivolous expenditures. At that point of the book, we see that Polly and Tom seem to have developed strong feelings for one another.
At the end of the book, Tom returns from the West and finally gets engaged to his true love, Polly.

Question: Who end up being on the brinks of bankruptcy?
Answer: The Shaws
Alternative answer: Shaws