  We present a determination of the $P$-wave $\pi\pi\to\pi\gamma^\star$
transition amplitude from lattice quantum chromodynamics. Matrix elements of
the vector current in a finite-volume are extracted from three-point
correlation functions, and from these we determine the infinite-volume
amplitude using a generalization of the Lellouch-L\"uscher formalism. We
determine the amplitude for a range of discrete values of the $\pi\pi$ energy
and virtuality of the photon, and observe the expected dynamical enhancement
due to the $\rho$ resonance. Describing the energy dependence of the amplitude,
we are able to analytically continue into the complex energy plane and from the
residue at the $\rho$ pole extract the $\rho\to \pi \gamma^\star$ transition
form factor. This calculation, at $m_\pi\approx 400$ MeV, is the first to
determine the form factor of an unstable hadron within a first principles
approach to QCD.
