Unfortunately this is not a good idea because, well, to put it simply, a person viewing your photo will instantly know if it was taken by a professional. There are a ton of things that go into getting a shot that really works.
The lighting, quality of the photo, and expression are crucial to making a professional presentation of yourself. If you ask a friend to shoot your headshot and they don't have much experience, you will likely wind up with a photo that is too dark or too bright, has a distracting background, and doesn't have you displaying a confident expression.
Do you really want a casting director or potential employer viewing your headshot to think you weren't willing to invest in hiring a professional to take your photo?
On another quick note... I know some people decide to go to CVS or Wal-Mart to get their headshot taken. Again, this is not a great idea because the photographer's there are not going to spend any time pulling great expressions out of you. Yes, the lighting may look good, but if you feel uncomfortable and aren't having a fun time during your shoot, it's going to show in your expression.
You want a winning headshot that shows you off as someone really taking their selves and career seriously, right?