They do use chemicals, but it is safe to use. Shaving cream has to go through a lot of testing before it's considered safe enough for the public. Don't worry.
the shaving creams are absolutely safe to use. You should not be having any kind of proble until or unless you are allergic to some chemical. If you are, contact you local doctor for advice.