The interconversion of model cyclobutene and butadiene derivatives under thermal (heating) and photochemical (Ultraviolet irradiation) conditions is illustrative. 
The Woodward–Hoffmann rules apply to either direction of a pericyclic process. Due to the inherent ring strain of cyclobutene derivatives, the equilibrium between the cyclobutene and the 1,3-butadiene lies far to the right. Hence, under thermal conditions, the ring opening of the cyclobutene to the 1,3-butadiene is strongly favored by thermodynamics. On the other hand, under irradiation by ultraviolet light, a photostationary state is reached, a composition which depends on both absorbance and quantum yield of the forward and reverse reactions at a particular wavelength. Due to the different degrees of conjugation of 1,3-butadienes and cyclobutenes, only the 1,3-butadiene will have a significant absorbance at higher wavelengths, assuming the absence of other chromophores. Hence, irradiation of the 1,3-butadiene at such a wavelength can result in high conversion to the cyclobutene.
Thermolysis of trans-1,2,3,4-tetramethyl-1-cyclobutene (1) afforded only one geometric isomer, (E,E)-3,4-dimethyl-2,4-hexadiene (2); the (Z,Z) and the (E,Z) geometric isomers were not detected in the product mixture. Similarly, thermolysis of cis-1,2,3,4-tetramethyl-1-cyclobutene (3) afforded only (E,Z) isomer 4.  In both ring opening reactions, the carbons on the ends of the breaking σ-bond rotate in the same direction. On the other hand, the opposite stereochemical course was followed under photochemical activation: When the related compound (E,E)-2,4-hexadiene (5) was exposed to light, cis-3,4-dimethyl-1-cyclobutene (6) was formed exclusively as a result of electrocyclic ring closure. This requires the ends of the π-system to rotate in opposite directions to form the new σ-bond. Thermolysis of 6 follows the same stereochemical course as 3: electrocyclic ring opening leads to the formation of (E,Z)-2,4-hexadiene (7) and not 5.
The Woodward-Hoffmann rules explain these results through orbital overlap:In the case of a photochemically driven electrocyclic ring-closure of buta-1,3-diene, electronic promotion causes  to become the HOMO and the reaction mechanism must be disrotatory.Conversely in the electrocyclic ring-closure of the substituted hexa-1,3,5-triene pictured below, the reaction proceeds through a disrotatory mechanism.