The integration of nanophotonics and atomic physics has been a long-sought goal that would open new frontiers for optical physics, including novel quantum transport and many-body phenomena with photon-mediated atomic interactions. Reaching this goal requires surmounting diverse challenges in nanofabrication and atomic manipulation. Here we report the development of a novel integrated optical circuit with a photonic crystal capable of both localizing and interfacing atoms with guided photons. Optical bands of a photonic crystal waveguide are aligned with selected atomic transitions. From reflection spectra measured with average atom number N=1.1+/-0.4, we infer that atoms are localized within the waveguide by optical dipole forces. The fraction of single-atom radiative decay into the waveguide is Γ1D/Γ'≃(0.32±0.08), where Γ1D is the rate of emission into the guided mode and Γ' is the decay rate into all other channels. Γ1D/Γ' is unprecedented in all current atom-photon interfaces.