check the thermcouple (it catches the flame on its tip from the pilot and keeps the valve open). if its faulty or worn out will need replacing, also check the pilot light itself is it a good blue flame or a weak yellow. it could be partially blocked with soot or dust its well worth cleaning with a hoover or better to take it apart and clean it out. i wouldnt thinks its the valve
kash
January 2013