We verify the finite time fluctuation theorem for a linear Ising chain at its ends in contact with heat reservoirs. Analytic results are derived for a chain consisting of only two spins. The system can be mapped onto a model for particle transport, namely the symmetric exclusion process, in contact with thermal and particle reservoirs. We modify the symmetric exclusion process to represent a thermal engine and reproduce universal features of the efficiency at maximum power.