Breastfeeding

So I tried breastfeeding, but I wasn't producing enough milk so I had to give my baby formula because she was basically starving (that's what the doctor told me) and now she doesn't want my boob. I still try to breast feed once in a while but she gets frustrated and starts crying so I just give her the bottle. 
I try to pump once or twice a day because I still want her to get breast milk, but only get half an ounce or less. 
I don't pump more because it hurts since nothing is coming out... I really want to give her breast milk, but i don't know what to do to make more. 
Has anyone had this problem?
What did you do to produce more milk? 
Has anyone been able to breastfeed after not doing it for a month?