According to Jim Recap: The Imaginary Friend
It isn't really any surprise that Jim doesn't want to go to a shower when Cheryl tells him about it. It isn't even terribly surprising that he tells her that he has something to do. What may be a bit of a shock is when he mentions to Andy the friend he has to pick up is completely fictional. That's right. Gus Dimas, who he has used all these years to get out of event after event, and has told everyone was even at their wedding, simply doesn't exist. This is a new level, even for Jim.
Cheryl, however, is beginning to suspect that something is up. So she decides to up the ante herself, by saying that the shower has been moved to the next night, and so now she can go with Jim to pick up Gus at the airport. They get there and find only a single piece of unclaimed luggage - a crate of oranges.
Andy happens to run into Dana at the house, and finds out what happens, and he calls Jim, and Jim uses it to his advantage, pretending that Andy is Gus calling to say he was delayed and won't be coming in until tomorrow (thinking that he'll still be able to use Gus to get out of the new night).
That's when Cheryl breaks it to him - she was lying. The shower is still on and they can make it tonight. Looks like he's stuck. Even better, they can have Gus over for dinner the next night, too! Looks like Jim may be in trouble. Jim isn't done though. He orders up a telegram and has it sent to the house saying that Gus died overnight.
To sweeten the pot, he leaves himself a pinball game (a Robot Warrior: Cyber Death pinball game, as seen in Scary Movie - nice tie-in) from Gus. Not to be outdone, and thinking she has him in the ropes, Cheryl calls Gus' favorite charity to "adopt" a sea lion. She makes sure Jim is listening and agrees to pledge $200, then $400, then $500. When he doesn't budge, she eventually throws in an extra $200 to name the next pup after Gus. Still nothing.
When Cheryl is no longer listening, Jim tells Andy that it was money well spent, for all the events Gus got him out of over the years. Then they tell Cheryl that Sherman will appreciate it even more, for he was one of Gus' closest friends - and apparently the next imaginary friend that Jim will use.
This is an interesting episode, for it is the only one I have seen where Jim didn't actually get caught in his scheme. He actually makes it all the way through the episode, and continues using it (even expanding it to include a new imaginary friend) into the future.

















