"Shimatta" does not directly translate to "shit". If you want to say that, use "kuso" instead.

Shimatta is more of a "dang" or "oops" kind of word. It even shows up in a particular verb conjuguation. So you can use it fairly safely in mixed company, although ideally you won't have to use it at all.