The aim of this work is the study of the planet-metallicity and the planet-stellar mass correlations for M dwarfs from the HARPS GTO M dwarf subsample. We use a new method that takes advantage of the HARPS high-resolution spectra to increase the precision of metallicity, using previous photometric calibrations of [Fe/H] and effective temperature as starting values.