"could this be a fault with camera , or just bad settings by me" Well, as you probably surmised, it could be either.
When you set the camera to shutter priority you are in effect telling the camera "I will select the shutter speed I want and you try to obtain a correct exposure by adjusting the lens aperture." However, if you are trying to shoot a dimly lit scene and you happen to select a very high shutter speed, there is no way the camera can adjust the lens aperture enough to allow sufficient light for a proper exposure, resulting in a dark image. In order to make an assessment of whether the camera may be faulty or you may be using bad settings, we need more information. Please provide as much of the following as you can: - Shutter speed(s) you selected - Lighting conditions in the scene you were trying to capture - Which lens were you using, and especially what was its maximum aperture - ISO setting (This equates to film speed. For example Kodak recommended 100 speed film for bright daylight, and 400 or 800 speed film for dim light. The ISO setting on the camera works virtually the same way. Note that with high-speed film you got more film grain; with high-ISO speeds on a digital camera you get more digital noise).
The information requested above is probably all contained in the EXIF information inside your image files. Most image browsers have the ability to display the EXIF information, but you may have to query the image browser help file to learn how to turn on this feature - depends on the particular application.
For images in manual exposure mode, you must select the correct shutter speed *and* lens aperture for proper exposure - the camera does not set these at all. The camera's built-in light meter is a good guide to achieving correct exposure - for both shutter priority and manual (and aperture priority, too).