M is the abbreviation or symbol for the unit of molar concentration. The symbol for the quantity itself is c, as in c = n/V.
If you found a bottle of pure formate ions, you could weigh 10 g of them. You won't find one, so you'll have to stick to the information given in the problem, weigh out potassium formate, and use the stoichiometric conversion factor that dissolution and dissociation of one mole of potassium formate produces one mole of formate ions in solution.