To connect an SLR camera to your telescope, you need two accessories: a T-ring and a T-adapter. This T-ring attaches securely to your Pentax SLR camera body. The T-thread interface on the T-ring then attaches your camera to a T-adapter for astrophotography.
To connect your camera to your telescope, first remove the visual accessories you are using - eyepiece, diagonal and so on. The SLR camera lens needs to be removed and the T-ring attached. The T-adapter is then screwed into the T-ring and attached firmly to the telescope.
This T-ring will fit all cameras with M42 lenses