I recently had to design a device that used a chip with a heatsink underneath the body of the chip. This heatsink had to be both electrically and thermally connected to the PCB.
Typically these devices (see picture) are soldered to PCBs using reflow techniques, where solder paste is stencilled to the board, robots place the chips and a special oven heats the device till the solder paste melts. Other devices with the same problem include driver chips and high power LEDs.
I originally tried using silver heatsink compound however although it was pretty good thermally it didn't make a reliable electrical connection, the cct malfunctioned with vibration and the magic smoke escaped...leading to much swearing and frustration.
After some experimentation I came up with this method to solder underneath these types of devices for hand prototyping without needing a reflow oven.
Step 1: Prepare thermal vias
Your PCB should have a copper area underneath the chip heatsink for electrical and thermal connection.
First drill small holes (as many as can fit) under where the chip heatsink goes.
Next poke through copper wire through the holes (second picture). Try to use wire as thick as the holes will allow. You need a tight fit. I just used the leads from a diode....they were just right....and made of copper (plated with tin).
Second time around I'd poke the wires from the bottom just enough to poke out, but not too far (third pic).