I would ask her point blank, "What is it you want me to say?" When she tells you, you say, "I can't write that, I've never taught him/have no experience with him/know that's not true."
Here's the thing: there may be no way to get out of this without being direct, but that doesn't mean it's not polite to do so. "I'm sorry, that won't be possible," "No," "I'm afraid I simply can't do that," are all fine. The problem, of course, is the "WHY???" that will follow, and it's up to you to decide how far you want to go with it.
If it is someone for whom you think it might work, could you say, "I'm sorry, I can't put my professional reputation on the line writing a recommendation for someone I don't honestly feel merits it." If not, it wouldn't be rude at all to say, "I don't know him very well, but from everything I've heard, I don't think I can honestly recommend him."