The effective nonlinear response of films of random composites consisting of a binary composite with nonlinear particles randomly embedded in a linear host is theoretically and numerically studied. A theoretical expression for the effective second harmonic generation susceptibility, incorporating the thickness of the film, is obtained by combining a modified effective-medium approximation with the general expression for the effective second harmonic generation susceptibility in a composite. The validity of the thoretical results is tested against results obtained by numerical simulations on random resistor networks. Numerical results are found to be well described by our theory. The result implies that the effective-medium approximation provides a convenient way for the estimation of the nonlinear response in films of random dielectrics.