Is it something you can explain to your friend ahead of time? Have you helped someone do this before?
Using a connection to get a competing offer is significantly worse. I don't think you should even ask.
If your friend works at the company, you're basically saying, "There's no way I'd work for your company, but I'd like to use you (and your company) to further my own career."
If your friend does not work at the company, you're asking them to spend their own personal capital on you, and they may not be able to use it again after you waste the company's time.
And to do that I would probably need to know how they were doing at the job, for example I have a friend at a job he's been at for a few years and he has begun to be unhappy with it and is looking to get back into consulting. I could ask him something like this but otherwise I wouldn't because you are asking your friend to look like a chump at their work. (chump is an old fashioned word but I think it really applies here)