A grocery shop can be eye-wateringly expensive, but overlooked tins, jars and dried ingredients could hold the key