Weight lose pills or suggestions

I've put on about 20 pounds due to switching birth controls 3 times the past year for health reasons. I've tried to be more active but I am having trouble loosing the weight. I constantly get hungry so I thought about trying a weight lose pill but I don't know which ones actually work/are safe. It does anyone have other suggestions of how to loose the weight???