If you are staying in Malaga, this is a great way to visit the Caminito del Rey. You can purchase a ticket combining train, bus and the entrance to the path on any of the ticket vending machines at train stations in Malaga. All the information regarding the steps to follow when buying the tickets can be read on the poster located next to the machines.
Important! You can only buy tickets on the same day you are going. the ticket machine is open from 6am to 09:15 every day except Monday (when the Caminito del Rey is closed)
There are 100 tickets available each day with 30 allocated for guided tours and 70 for self guided tours. Prices are 23 euros sin guía (without a guide) and 31 euros con guía (with a guide)
Its in Spanish but fairly straight forward to follow.