It sounds like the water flow rate through the heater is too slow making the water too hot so that it trips the safety cut out, then it cools down, then it resets then it all happens again! Something is limiting the water flow. Normally this is done by the user turning a knob to increase or decrease the flow. I assume you have turned this up to maximum flow (which will give minimum temperature). Double check you've turned it thre right way!
If you've done that then we are looking at some other restriction in the water supply. There may be a filter in the cold water supply pipe to the shower and if you've had any plumbing work in the house recently this may have dislodged debris which is now partially blocking the filter.
Also worth considering is a blockage on the shower head side - the small holes can scale up and reduce the water flow. Try removing the shower head so you just have the hose for the water to go through - if it's ok like that, you just need a new shower head.
Hope some of that helps!
Richard, January 2009