In Charlotte's Web, the shape-shifter is Templeton. Templeton never does anything for anyone else- unless he gets something out of it.
For example, when Wilbur needed to get Charlotte's egg sac so he could be her children to the old barn, Templeton wouldn't help to get it for Wilbur. On for a couple pages, Wilbur had to beg and plead Templeton to help. Templeton finally gave in when Wilbur offered Templeton as much food from the trough that he wanted before Wilbur ate. In turn, Templeton turned into a huge, fat rat who looks like he might explode or die of a heart attack at any second.
When Templeton didn't want to go to the county fair, the old sheep had to bribe him with all the "tempting" descriptions of dropped food. In the end, he went to the fair and had a wonderful night. He was still a bit grumpy from being ordered around to find a good, last word for Charlotte to write in her web.
The Shape-shifter is the person who changes sides, depending on bribes, also like in Star Wars, which Han Solo is the Shape-shifter.