Extract shop table code into a separate class.