The thermodynamic model of ultrathin lubricant film melting, confined between two atomically-flat solid surfaces, is built using the Landau phase transition approach. Non-equilibrium entropy is introduced describing the part of thermal motion conditioned by non-equilibrium and non-homogeneous character of the thermal distribution. The equilibrium entropy changes during the time of transition of non-equilibrium entropy to the equilibrium subsystem. To describe the condition of melting, the variable of the excess volume (disorder parameter) is introduced which arises due to chaotization of a solid structure in the course of melting. The thermodynamic and shear melting is described consistently. The stick-slip mode of melting, which is observed in experiments, are described. It is shown that with growth of shear velocity, the frequency of stiction spikes in the irregular mode increases at first, then it decreases, and the sliding mode comes further characterized by the constant value of friction force. Comparison of the obtained results with experimental data is carried out.