How exactly do you measure the free energy of a reaction?
How would you go about measuring the energy (in joules) of a reaction
  using the heat of the reaction?


You can measure the heat of a reaction (the enthalpy of reaction, $\ce{\Delta H}$) using a calorimeter, but the enthalpy of the reaction is only one part of the free energy of the reaction ($\ce{\Delta G}$). $\ce{\Delta G}$ is related to $\ce{\Delta H}$ through the following equation $$\ce{\Delta G = \Delta H} - T \Delta S$$ where $\ce{T}$ is the temperature and $\ce{\Delta S}$ is the change in entropy for the reaction.

To use a calorimeter you put your reactants into the calorimeter and let the reaction proceed.  The calorimeter is thermally isolated from its surroundings, so any heat given off (exothermic) or absorbed (endothermic) during the course of the reaction can be accurately measured.  Knowing the moles of reactant you put into the calorimeter and the heat change in joules (using the measured $\ce{\Delta T}$ and the known heat capacity of the calorimeter) you can determine $\ce{\Delta H}$ in joules/mole.  Here is a link that provides more detail about calorimeters along with some problems that are worked out in detail.