The following isbased upon English law but, to the best of my knowledge, the situation is similar in Scotland:
Point 1 (Bad news from your friend's point of view):
The gym were within their rights to say 'It's not our problem; pay up!'. A contract remains in place, irrespective of the change in circumstances to it.
Point 2 (Bad news again):
Anyone who is owed money by someone else, and who does not receive payment, can take county court action, seeking a judgement against the debtor.
Point 3 (Yet more bad news):
Having a CCJ against her name will make it very hard for her to get credit. (She can't be directly 'blacklisted, as such, by the debt collection agency but potential lenders will be reluctant to lend to anyone with a CCJ).
AND NOW THE GOOD NEWS!
Courts aren't stupid. They don't issue CCJs which demand full payment when it's clear that the debtor can't pay. If your friend provides the court with details of her financial circumstances, the order against her will only be for payment of a very small sum each week (or each month). As long as she keeps up with those payments, she's effectively protected from any further action by the gym or their debt collection agency.
Chris