Here's a video showing you how to remove urine from tile and grout using shaving cream as a cleaner. I've heard from a lot of people who have used shaving cream to remove some tough spots from carpet and upholstery, but I have not heard of it being used to remove urine.
I can tell you that shaving cream does have some powerful cleaning properties and can be used to loosen tough spots and stuck on goo, but it fails to remove urine odors.
I have been removing urine from tile and grout for years as a professional tile and grout cleaner in Tampa FL. I have been called to clean some pretty urine stained tile floors. The tough part is getting rid of the urine in the grout. Rarely is there a problem removing urine from non porous surfaces, like ceramic and porcelain tile. Grout on the other hand is very porous and readily absorbs urine.
Removing urine from grout is almost impossible. it has to be neutralized in place to effectively remove the odor. Enzyme treatments can be used to neutralize the odors but enzymes alone might not get rid of it all.
In Tampa FL we are finding a lot of homes that have more tile then carpet. this means more pet urine in the grout. First we neutralize the urine and then perform a full tile and grout cleaning to rinse away and left over residue. This is how we get rid of the urine odor for good. Forget the shaving cream and give us a call.