  Josephson junctions are the basis for the most sensitive magnetic flux
detectors, the definition of the unit volt by the Josephson voltage standard,
and superconducting digital and quantum computing. They result from the
coupling of two coherent quantum states, as they occur in superconductors,
superfluids, atomic Bose-Einstein condensates, and exciton-polariton
condensates. In their ground state, Josephson junctions are characterised by an
intrinsic phase jump. Controlling this phase jump is fundamental for
applications in computing. Here, we experimentally demonstrate controllable
phase relations between photon Bose-Einstein condensates resulting from
particle exchange in a thermo-optically tunable potential landscape. Our
experiment realises an optical analogue of a controllable 0,$\pi$-Josephson
junction. By connecting several junctions, we can study a reconfigurable
4-condensate system demonstrating the potential of our approach for analog spin
glass simulation. More generally, the combination of static and dynamic
nanostructuring techniques introduced in our work offers a powerful platform
for the implementation of adaptive optical systems for paraxial light in and
outside of thermal equilibrium.
