Marks & Spencer has been collaborating with competitors as part of efforts to implement a living wage in factories that supply its stores.