We study theoretically, via Monte Carlo simulations on lattices containing up to 1000 x 1000 spins, thermal creation of skyrmion lattices in a 2D ferromagnetic film with perpendicular magnetic anisotropy and Dzyaloshinskii-Moriya interaction. At zero temperature, skyrmions only appear in the magnetization process in the presence of static disorder. Thermal fluctuations violate conservation of the topological charge and reduce the effective magnetic anisotropy that tends to suppress skyrmions. In accordance with recent experiments, we find that elevated temperatures assist the formation of skyrmion structures. Once such a structure is formed, it can be frozen into a regular skyrmion lattice by reducing the temperature. We investigate topological properties of skyrmion structures and find the average skyrmion size. Energies of domain and skyrmion states are computed. It is shown that skyrmion lattices have lower energy than labyrinth domains within a narrow field range.