Residents have been urged not to put batteries or items containing them in the bin after a fire broke out during a waste collection.