score:11
First, the Verpflichtungserklärung (I'll call it VPE) is not really an invitation.
If you cause unplanned substantial costs for the government etc. (law suit, deportation, medical costs...) that you can't pay on your own, the VPE is a guarantee that your friend will pay for you. While not mandatory in any way, it can be the difference between getting a visa and not. ... 5000€ for two weeks may sound harsh, but the value actually does not depend on the planned duration of the stay.
About the bank part which is necessary because her income is not high enough: She just can go to a bank of her choice, open a bankbook (distinct from her normal accounts) with the money, and tell the bank that withdrawals should only be possible with consent of the Ausländerbehörde.
To make the VPE itself, some forms need to be filled out at the local Ausländerbehörde. Other than an ID and the bankbook, your friend should also bring a proof that she rents or owns something to live in, and has a paid job.
As soon as you arrive, she (or you) tells the Ausländerbehörde that you're here; you'll then get a form called Grenzüberschrittsbescheinigung. When you leave again, show it at the border, then she can access her money again.
If you never come in the first place, the VPE expires after max. 6 months. Then she can get her money back too. Withdrawing a VPE before this time limit is not really possible in theory, but talking to the official in the Ausländerbehörde might help.
Sources:
https://www.auswaertiges-amt.de/DE/Infoservice/FAQ/VisumFuerD/13-Verpflichtungserklaerung.html?nn=350374
http://www.auswaertiges-amt.de/DE/Infoservice/FAQ/VisumFuerD/30-GueltigkeitVerpfl.html?nn=350374
https://service.berlin.de/dienstleistung/120691/
https://de.wikipedia.org/wiki/Verpflichtungserkl%C3%A4rung_%28Ausl%C3%A4nderrecht%29
https://www.gesetze-im-internet.de/aufenthg_2004/BJNR195010004.html