The title is based on the expression "If the shoe fits, wear it."
The leprechaun's name, Tim O'Shanter, is a play on "tam o'shanter," which is a traditional Scottish cap or bonnet. The name is somewhat misused here since leprechauns are Irish, not Scottish.
The leprechaun is played by Henry Gibson, who, at the time, was a regular performer on "Rowan & Martin's Laugh-In", which (from 1968 to 1970) was the most popular show on television.
Elizabeth Montgomery appears to be wearing a wig here: her hairline is all funky (strait across her forehead in an unnatural manner and lower on her forehead) and her hair has gone from blonde to dark/dirty blonde.