U[r_] = U0 (((((a/r)))^12) - 2 ((((a/r)))^6));

Int = 
        Evaluate[(r^2 Exp[-U[r]/k /T] - r^2) /. {U0 -> 1, 
              k -> 1, a -> 1}];

B2 = 
        Table[{T, -2 π NIntegrate[
                Evaluate[Int /. {U0 -> 1, k -> 1}], {r, 
                  0, ∞}]}, {T, 0.01, 100, 0.01}];

ListPlot[B2, PlotRange -> {{0, 100}, {-1, 1}}]