There's actually an assured way that you can not be betrayed by your friends in The Lesser Evil (Sort of). If you take Anders, Isabella, and Aveline, not only is the group makeup perfect for any class you play to complement it, but also having Isabella in the party prevents Aveline from betraying you (so long as you choose Feynriel's Pride as the first door to go through), after that, go through the other door and though the desire demon turns isabella against you with promises of a ship and "fully willing" crew, As long as you respond in the conversation wheel with the sarcastic remark, you will gain friendship points with isabella, rather than rivalry. Oh, and the painfully obvious part about Anders. Be smart. Don't consort with demons, especially with the shade at the beginning of the quest where Anders warns you about him. Just refuse to deal with the demon and get 10 points of friendship with Anders. The alternative is gaining Rivalry with Anders and getting an extra skill/attribute point from the demon's task (I can't remember which it is). But as easy as it is to buy tomes to augment your powers in the same way, you can't "buy" friendship points with your party members.