❝It is permissible to give (money) to obtain a right that belongs to you or to deflect a harm away from yourself. This is what has been reported from the Salaf and the expert Imams.❞
— Shaykh Taqi al-Din, Ibn Taymiyyah (r)
[Majmu’ al-Fatawa (31/287)]
The Messenger (peace and blessings be upon him) cursed the one who gives or takes a “Rishwah” (bribe). The definition of this is to pay someone in order to achieve something that you have no right to.
However, if this is the only way to obtain something that is your right in the Shari’ah, then it is permissible for you to do so in order to take what belongs to you.
The scholars of our Maddhab mention the ruling of Rishwah under the chapter, and at times sub-chapter, of the Etiquettes of the Judge.