Do it the recommended way the manufacturers use. Take the heatsink and drill a 1mm hole through it to contact the middle of the rear surface of the package, mount the device and use a ( preferably calibrated) welded tip thermocouple and a blob of heatsink compound to measure the temperature. Caution is that the thermocouple will be in electrical contact with the device, so will have the same voltage excursions as the device.
Less accurate is to place the thermocouple on the heatsink next to the device, insulated by 2 thicknesses of Kapton tape from the device and heatsink, and taped down so it is firmly in contact with the side of the device but is still insulated. Will have a constant temperature difference to true temperature of the device, but at least will give you an indication within 5C or so of actual base of device temperature.