The magnetic state of a quantum dot attached to superconducting leads is experimentally shown to be controlled by the superconducting phase difference across the dot. This is done by probing the relation between the Josephson current and the superconducting phase difference of a carbon nanotube junction whose Kondo energy and superconducting gap are of comparable size. It exhibits distinctively anharmonic behavior, revealing a phase mediated singlet to doublet transition. We obtain an excellent quantitative agreement with numerically exact quantum Monte Carlo calculations. This provides strong support that we indeed observed the finite temperature signatures of the phase controlled zero temperature level-crossing transition originating from strong local electronic correlations.PACS number(s): 74.50.+r, 72.15.Qm, 73.63.Fg When a localized magnetic moment interacts with a Fermi sea of conduction electrons, the Kondo effect can develop: spin-flip processes lead to a many-body singlet state in which the delocalized electrons screen the moment. Quantum dots (QD) in the Coulomb blockade regime and particularly carbon nanotube (CNT) dots constitute ideal systems for the investigation of Kondo physics at the single spin level [1][2][3]. In these systems, it is possible to control the number of electrons on the dot varying a gate voltage. For an odd occupation, the dot accommodates a magnetic moment which is screened provided that this is not prohibited by an energy scale larger than the Kondo energy k B T K . Temperature is the most obvious obstacle to the development of the Kondo effect since T K can be smaller than 1K. However, if temperature is sufficiently low, the Kondo effect may compete with other quantum many-body phenomena such as superconductivity, for which the formation of Cooper pairs of energy ∆ may prevent the screening of the dot's spin. This situation can be investigated using superconducting hybrid junctions, where a supercurrent is induced by the proximity effect, for example in or semiconductor-based ones [5].A setup of a high resistance tunnel barrier between two superconductors, also called Josephson junction (JJ), carries a supercurrent I = I C sin ϕ, with the critical current I C . The superconducting phase difference across the junction ϕ controls the amplitude and the sign of the supercurrent. This is the Josephson relation, the most famous example of a current-phase relation (CPR). In some peculiar systems such as ferromagnetic superconducting junctions, the transmission of Cooper pairs gives rise to a π phase shift of the CPR [6]. In QD JJs (tunnel barrier replaced by QD) in the strong Coulomb blockade regime where the Kondo effect is negligible, such a π shift is observed as well since the tunneling of a Cooper pair implies reversing the order of particles within this pair. This leads to a gate-controlled sign reversal of the CPR when the parity of the number of electrons is changed, as was observed experimentally [7][8][9][10]. In contrast, if the Kondo effect and thus local correlations...