Inflation in British shops rose to the highest level in almost two years as retailers grapple with higher costs, an industry survey found.