Yes diet is incredible important so it's going to be hard for anyone to give advice without that starting point. But at this stage I'm sort of assuming you are correct in your assumption she started bootcamp and some crazy 1000 Cal plan, which is not the way she should be going.
Now I admit I am not a doctor or anything close but this is from reading I have done.
Sounds like her hormones are completely fucked up. Diabetes, PCOS and endo are all caused or can be made worse by crappiness in hormone levels and production.
Dropping the weigh she has will make everything better in the long term so that should be her ultimate goal. But doing it in sudden and drastic ways that are advertised everywhere and often targeted at women such as meal replacement shakes and sudden high intensity crappy exercise programs that are seen in things such as bootcamps can just make everything worse by messing up hormone levels further.
So she needs to be on diet and exercise that is sustainable while getting her to a managable weight. Limited carb diet would be the first thing to start off with. Keto would probably be good if you can get her to make the transition and stick with at least low carb.
The other thing is to get her to ditch the shit cardio like bootcamps and get her into a muscle gym to work with the weight and iron. Resistance training has been shown to improve insulin sensitivity so this is really the way to go. Plus it's awesome.
When doing my own research into eating styles I read quite a bit on marksdailyapple and other paleo/primal sites and forums. While I don't agree with everything on that site the basic premise is to eat clean foods with relatively low carbs and weight train. And this is what you friend should really be looking to do. Anyway on those forums there are heaps of women saying how eating like this has helped with PCOS and endo symptoms enormously.
She really wants to get off metformin as soon as she can so her body doesn't start to rely on it.