A friend who is only a friend when circumstances are pleasant or profitable. At the first sign of trouble, these capricious, disloyal friends will drop their relationship with you.
I had thought Ted would stand by me when I was accused of theft, but it turned out he was only a fair-weather friend.