What happens to current in a RC-battery circuit when you move plates with a square signal?
The current in the resistor is equal to the rate of change of the charge in the capacitor :
$$i = \frac{d q}{dt}$$
where:
$$q = C v$$
In the general case [thanks to Chu], the current is then equal to:
$$i = C\frac{d v}{dt} + v\frac{d C}{dt}$$
In &quot;standard&quot; capacitors, the capacitance is a constant, and above equations can be simplified as the well-known relation:
$$i = C\frac{d v}{dt}$$
On the contrary, in your circuit, the capacitance is time dependent, and you cannot make the same simplification.
If you consider now that voltage is a constant (which is the case if your resistance is small enough, so voltage drop is negligible compared to the battery voltage), then \$\frac{d v}{dt}=0\$ and:
$$i = v\frac{d C}{dt}$$
Thus, the current is proportional to the rate of change of the capacitance.
This principle is used in condenser microphones.
[ADDED] Where the energy comes from
I forgot the part of the question about energy.
Because of the DC voltage (bias) created by the battery, there is a small electrostatic force that tends to attract the two plates to one another. When you move the plates against this force (i.e. draw them apart), you convert mechanical energy into electric energy. If the plates get closer to one another, electric energy is converted into mechanical energy.

Do we have to integrate the signal ?

You should integrate the current, and multiply by the battery voltage. In your plot, the base line is the battery voltage (U=32V). You should integrate the difference between the peak voltage and 32V (i.e. the voltage across the resistance), and then multiply by 32V to get the energy exchanged during one move.
$$ q=\int \frac{U_c - U}{R_l} dt$$
$$ {Energy} = q \times U $$
Note that both the current and the energy flow can only exist if there is a DC bias (the battery).