This video tutorial from radeon4350 shows how to connect dualshock PS3 console controller to PC.
First, download driver software from here: http://www.motionjoy.com/download
Next, connect controller to PC using USB connection.
Install driver software.
Then browse to All Programs from Start menu, select Motionjoy and press Instal motion driver. Run this as an administrator.
Reboot your computer. Open DS3 utility from start menu and select Use as 360 controller option.
Your controller now will work with 360 compatible games.
To get your controller work with 360 non compatible games, download and install Xpadder application from here: http://www.softpedia.com/progDownload/Xpadder-Download-45445.html.
Open Xpadder and click Create a new layout. Then follow on-screen instructions.
Assign keyboard key for each controller button. Thus you will be able to play any non 360 compatible game.