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 ?



Analogue of integration for group cohomology
We always have a pairing $H\_k(X, \mathbb{R}) \otimes H^k(X, \mathbb{R}) \to \mathbb{R}$ between chains and cochains. If $X$ is a closed oriented $n$-manifold, the orientation equips it with a class $[X] \in H\_n(X, \mathbb{R})$ called the *fundamental class*, and pairing this class with elements in $H^n(X, \mathbb{R})$ reproduces integration of $n$-forms when $X$ is smooth. When $X$ is furthermore aspherical, so a $K(\pi\_1(X), 1)$, then its homology and cohomology can be computed as group homology and cohomology of $\pi\_1(X)$ as Ben Wieland says in the comments. 


