Consider some oriented surface $S$ with fundamental group $\pi_1(S)$. The group cohomology of $\pi_1(S)$ with coefficients in $\mathbb{R}$ is isomorphic to the de Rham cohomology of $S$. In degree 2, integration gives a map $\int_S\colon H^2_{dR}(S;\mathbb{R})\to \mathbb{R}$.

In terms of group cohomology, with cochains being (inhomogeneous) maps $\pi_1(S)\times \pi_1(S)\to \mathbb{R}$ instead of 2-forms, what is the analogue of integration ? Say differently, is there a natural map $H^2(\pi_1(S);\mathbb{R})\to \mathbb{R}$ that corresponds to integration of differential forms ?