Two retailers have been fined thousands of pounds after failing to adequately store fireworks in their shops.