The high intensities reached today by powerful lasers enable us to explore the interaction with matter in the relativistic regime, unveiling a fertile domain of modern science that is pushing far away the frontiers of plasma physics. In this context, refractive-plasma optics are being utilized in well established wave guiding schemes in laser plasma accelerators. However, their use for spatial phase control of the laser beam has never been successfully implemented, partly due to the complication in manufacturing such optics. We here demonstrate this concept which enables phase manipulation near the focus position, where the intensity is already relativistic. Offering such flexible control, high-intensity high-density interaction is becoming accessible, allowing for example, to produce multiple energetic electron beams with high pointing stability and reproducibility. Cancelling the refractive effect with adaptive mirrors at the far field confirms this concept and furthermore improves the coupling of the laser to the plasma in comparison to the null test case, with potential benefits in dense-target applications.