The original Gelfond–Schnirelman method, proposed in 1936, uses polynomials with integer coefficients and small norms on [0, 1] to give a Chebyshev-type lower bound in prime number theory. We study a generalization of this method for polynomials in many variables. Our main result is a lower bound for the integral of Chebyshev's $\psi $-function, expressed in terms of the weighted capacity. This extends previous work of Nair and Chudnovsky, and connects the subject to the potential theory with external fields generated by polynomial-type weights. We also solve the corresponding potential theoretic problem, by finding the extremal measure and its support.