Incentivize good behavior. The reason they may consider joining a pipeline project now is still their need for energy resources at the cheapest price. If they don’t want to participate, TAPI could be come TAP and the pipeline extended to Karachi port or up to China. Same goes for the IPI pipeline, but in that case it would have to terminate in either India or China to make it financially viable, unless Pakistan wants to shoulder that cost, which it seems it doesn’t.
secondly, with all the rail infrastructure being built in India, a line or two to Central Asia is not primarily about central Asia (although they grow cheaper cotton), it is about transporting more time sensitive goods to Russia and Europe, and vis versa. Russia is a major wheat exporter. It could send wheat via rail directly to either Karachi (and on to Africa) or the Indian Market. All this if there is a $5 billion rail like between Peshawar and Uzbekistan. The Chinese have been upgrading rail lines in Central Asia. They wouldn’t be doing so unless they thought it was good business.