  We report a leading-order (LO) calculation of
$^7\mathrm{Be}(p,\gamma)^8\mathrm{B}$ in a low-energy effective field theory.
$^8\mathrm{B}$ is treated as a shallow proton$+^7\mathrm{Be}$ core and
proton$+^7\mathrm{Be}^{*}$ (core excitation) $p$-wave bound state. The
couplings are fixed using measured binding energies and proton-$^7\mathrm{Be}$
$s$-wave scattering lengths, together with $^8\mathrm{B}$ asymptotic
normalization coefficients from ab initio calculations. We obtain a zero-energy
$S$-factor of $18.2 \pm 1.2~({\rm ANC~only})$ eV b. Given that this is a LO
result it is consistent with the recommended value $S(0)=20.8\pm1.6$ eV b. Our
computed $S(E)$ compares favorably with experimental data on
$^7\mathrm{Be}(p,\gamma)^8\mathrm{B}$ for $E <0.4$ MeV. We emphasize the
important role of proton-$^7\mathrm{Be}$ scattering parameters in determining
the energy dependence of $S(E)$, and demonstrate that their present
uncertainties significantly limit attempts to extrapolate these data to stellar
energies.
