Dear [Dr.],
I am writing to ask if you would be willing to write a letter of
recommendation for me.
[your name, your major, when you took the class, what grade you got in the class, detail what you're applying for and deadlines, ask if he wants you to bring CV/transcripts/essays/etc, and when will be a good time to meet him]
Thank you in advance for your time.
[your name]
[contact info]
If he doesn't answer back in a few weeks, just drop by his office. Do not mention the e-mail. Just say, "Hi my name is [], I was in your [] during the [] semester. I am applying to [] and was wondering if you would be willing to write a recommendation for me."
Trust me. You don't have to be best friends with these guys. As long as you're polite and you don't look like a huge dumb ass on paper, most professors WILL write you a letter. They understand how these things work. You don't need to feign interest (but if you truly are interested in them, you can small talk). Just be professional, have your **** ready, and thank them.
One other thing to note. I'm in the process of LORs and it's a huge bite in the ass. Suck up your pride and just ask everyone you made an A in if you're desperate. You have nothing to lose except your feelings when you get rejected. I haven't been rejected yet, because most professors at my school aren't dicks. Granted, these won't be stellar LORs, but they are better than nothing. Another thing is the WAITING and ANXIETY. You never know if they'll make the deadline, which is why it's OK to ask them politely to send you an email when it's sent, or just show up to their office and ask for a follow-up. End it by a thanks again.
Also, I know a lot of people like to give thank you cards/gifts. I honestly think a solid thank you is fine, and from what I read and heard most professors feel uncomfortable accepting gifts. Whatever you decide to do, be sure to thank the professor again after the letters are sent and follow-up with the professor if you've been accepted/rejected (trust me, they want to know!).