Don’t mix it up with the stiff legged deadlift. This is one of the best exercises to train the part of the hamstring located close to the glutes (the lower fibres can be trained more efficiently with the hamstring exercises). The exercise shall be performed with slightly bent knees and with such a straight back as much as it is possible. The bar has to be moved really close to your body this way the upper part of the hamstring and the glutes work. If the bar is further away from your body then the burden is taken over by the lower part of the back muscles.
Stand in narrow straddle, feet and head facing forward, and then grab the bar at shoulder width. Bend slightly forward with straight back and slightly bend your knees. Let the bar down closely in front of your body below your knees by pushing your hip (buttock) slightly backwards.
Performing the exercise the right way is really important – many people let their back curve at the end because they try to let the weight down as much as they can but this increases the injury risk. Rather don’t let the weight go down that much but your back should remain straight all the time, it can’t be curved in any event.