OK, 2 ways of doing it depending on pipe type. If it was solvent then we could use a branch but given that it looks like you have compression/push fits then the only way would be as Jack suggests.
Fit a T into the vertical section, small piece of horizontal pipe into an elbow, then a vertical piece of pipe from that and then top off with one of these :-
http://www.wickes.co.uk/McAlpine-Ve...e-with-1-1-2in-Universal-Outlet-VP2W/p/227126
Get the valve as high as poss, at least above the level of the water seal in the trap if you can.
Fit a T into the vertical section, small piece of horizontal pipe into an elbow, then a vertical piece of pipe from that and then top off with one of these :-
http://www.wickes.co.uk/McAlpine-Ve...e-with-1-1-2in-Universal-Outlet-VP2W/p/227126
Get the valve as high as poss, at least above the level of the water seal in the trap if you can.