TITLE: Analogue of integration for group cohomology
QUESTION [6 upvotes]: 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 ?

REPLY [3 votes]: 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.