Shop price inflation has fallen to its lowest level in more than three years as retailers attempt to lure consumers back with discounts and fierce competition, figures show.