What can a family do if their child needs intensive mental health treatment and won’t leave the home (agoraphobia)?

I know this group has a lot of valid opinions and concerns about the unethical TTI industry. I’m just curious what would be the right thing for a desperate family to do when their teenager is mentally ill and all other avenues have been unsuccessful at improving the situation?