As I understand it the pentagram and candles...
..are nothing to do with turning into rats, they were used to summon Raphael. Raphael was playing everyone off against each other: Morfred the mason (you can meet him in the House of Hope) made a pact with Raphael to kill the dark justiciars and Raphael ordered Yurgir to go and do it, but Lyrthindor, the last of the Justiciars, used the ritual pentagram to summon a devil to save himself - and it was Raphael again who appeared, gave him the secret of turning into rats (the Swarm Form feat from 3rd ed D&D in fact) thus trapping Yurgir in the Gauntlet of Shar by making it impossible to carry out the order.