By using XSHOOTER spectra acquired at the ESO Very Large Telescope, we have studied the surface chemical composition of the companion star to the binary millisecond pulsar PSR J1740-5340 in the globular cluster NGC 6397. The measured abundances of Fe, Mg, Al and Na confirm that the star belongs to the cluster. On the other hand, the measured surface abundance of nitrogen ([N/Fe]=+0.53 +- 0.15 dex) combined with the carbon upper limit ([C/Fe] <-2 dex) previously obtained from UVES spectra allow us to put severe constraints on its nature, strongly suggesting that the pulsar companion is a deeply peeled star. In fact, the comparison with theoretical stellar models indicates that the matter currently observed at the surface of this star has been processed by the hydrogen-burning CN-cycle at equilibrium. In turn, this evidence suggests that the pulsar companion is a low mass (~0.2 Msun) remnant star, descending from a ~0.8 Msun progenitor which lost ~70-80 % of its original material because of mass transfer activity onto the pulsar.