Looks like it's always been a song. A Google search came up with:
"Shaving Cream" - Benny Bell with Paul Wynn transcriber unknown
"There are more verses to this than you can imagine. In fact, there are an infinite number. People continue to make them up all the time. First are the words to the original recording. It was written by Ben Samberg (a/k/a Benny Bell) and sung by Phil Winston (a/k/a Paul Wynn). It originally came out in 1946, but finally hit the Billboard charts in 1975! This original recording is available on many 45's, as well as the original Paul Wynn album of 78's called _Cocktail Party Songs_ (wherein it's the B-side to "Automobile Song"), the LP/CD _Dr. Demento Presents the Greatest Novelty Records of All Time, Vol. 1 - The 1940's (and before!)_, Rhino 820, 1985, and the CD/CS _Dr. Demento's 25th Anniversary Collection_, Rhino 72124, 1995."
There are several different sites which have lyrics, the ones Denise put in and more, if you go to Google and search for "shaving cream lyrics."