YELLLOW BOX JUNCTIONS
Rule 174 of The Highway code states the following:
"Box junctions. These have criss-cross yellow lines painted on the road (see 'Road markings'). You MUST NOT enter the box until your exit road or lane is clear. However, you may enter the box and wait when you want to turn right, and are only stopped from doing so by oncoming traffic, or by other vehicles waiting to turn right. At signalled roundabouts you MUST NOT enter the box unless you can cross over it completely without stopping."
[Law TSRGD regs 10(1) & 29(2)]
This is what The Traffic Signs Regulations and General Directions 2002 say about box junctions
Interpretation of Part II of Schedule
6. In this Part of this Schedule -
(a) "box junction" means the area of carriageway marked with yellow cross-hatching at a junction between two or more roads on which there has been placed the road marking shown in diagram 1043 or 1044; and
(b) a reference (however expressed) to a vehicle which is stationary or stops within a box junction includes a vehicle which is stationary whilst part of it is within the box junction.
Prohibition conveyed by markings in diagram 1043 or 1044
7. - (1) Except when placed in the circumstances described in paragraph 8, the road markings shown in diagrams 1043 and 1044 shall each convey the prohibition that no person shall cause a vehicle to enter the box junction so that the vehicle has to stop within the box junction due to the presence of stationary vehicles.
(2) The prohibition in sub-paragraph (1) does not apply to any person -
(a) who causes a vehicle to enter the box junction (other than a box junction at a roundabout) for the purpose of turning right; and
(b) stops it within the box junction for so long as it is prevented from completing the right turn by oncoming vehicles or other vehicles which are stationary whilst waiting to complete a right turn.
Prohibition conveyed when markings are placed in conjunction with signs in diagrams 615 and 811
8. When the road marking shown in diagram 1043 or 1044 is placed in conjunction with the signs shown in diagrams 615 and 811 on an area of carriageway which is less than 4.5 metres wide at its narrowest point, the road marking shall convey the prohibition that no person shall cause a vehicle to enter the box junction so that the vehicle has to stop within the box junction due to the presence of oncoming vehicles or other stationary vehicles beyond the box junction.
If you get a Penalty Charge Notice for stopping in a box junction it will be issued by post under The London Local Authorities and Transport for London Act 2003.
You should note that the Highway Code offers sensible advice about not entering the box junction if your exit is not clear but it is not mandatory and there is no penalty if you fail to follow this recommendation (but that failure could be used against you if there was an accident). The critical issue for the issuing of a ticket is if you entered the box junction and stopped in it due to the presence of stationary vehicles. That is the test.