If your repository is badly broken and Magnolia can't work for some reason... one possible course of action is to disable the Magnolia filter in
web.xml, and write jsp scripts to fix it. Disabling the filter means there's no security, no rendering, nothing happening. It also means the Magnolia Context is not surrounding the execution of your jsp, so you need to take care of that manually.
The shell module serves the same purpose, and is easier/cleaner to use than jsp scripts.
This probably won't help cases where the repository is corrupted, but is definitely handy to repair things when node were accidentally removed, for instance (repository mappings, filter configuration, security settings, etc.) Use with caution, since it will mean your Magnolia instance will be temporarily exposed to bad behavior.