A search is presented for a singly produced third-generation scalar leptoquark decaying to a τ lepton and a bottom quark. Associated production of a leptoquark and a $\tau$ lepton is considered, leading to a final state with a bottom quark and two $\tau$ leptons. The search uses proton-proton collision data at a center-of-mass energy of 13 TeV recorded with the CMS detector, corresponding to an integrated luminosity of $35.9 fb^{-1}$. Upper limits are set at 95% confidence level on the production cross section of the third-generation scalar leptoquarks as a function of their mass. From a comparison of the results with the theoretical predictions, a third-generation scalar leptoquark decaying to a $\tau$ lepton and a bottom quark, assuming unit Yukawa coupling ($\lambda$), is excluded for masses below 740 GeV. Limits are also set on λ of the hypothesized leptoquark as a function of its mass. Above $\lambda=1.4$, this result provides the best upper limit on the mass of a third-generation scalar leptoquark decaying to a $\tau$ lepton and a bottom quark.