Usage of shaving cream also useful to kill these lice and their eggs. Apply a thick coat of shaving cream, rub it and keep it for about 15 to 20 min.
You have to treat the home and your head for head lice, and shaving cream ain't going to do it. Get rid lice spray and spray furniture, put any small fabric objects like stuffed animals, pillows, and kids toys in air tight bags for a week and wash all bed linens and wash your hair again in lice shampoo. Also maybe it is being spread from one person to another, so don't share personal objects and tell your friends. My sister had this kind of problem before turns out the neighbors kids weren't treating their house and kept giving lice to my niece every time they played together.
O shaving cream relieves the itch for a little bit but it will not cure the head lice all you have to do is buy shampoo made for killing an use it with the special comb Hope this helps xD