One way is to use xcape.
xcape [-d] [-t timeout] [-e map-expression]
This should do the trick:
xcape -e 'Shift_L=parenleft;Shift_R=parenright'
xcape is included as a package for some distributions.
###Notes:
Notes:
It has a default delay of 500ms after which the mapped key will not be emitted. It can be set by the -t option.
Each map-expression run as a daemon and has it's own PID.