Philosophy of Religion/Justice
Prudence is the highest natural virtue, as the power through which we properly see the world and determine the moral actions that we should take. Justice is the particular application of this between individuals and collectives.
There are several kinds of justice. Commutative justice is between individuals. This is the most common category that is thought of as justice - punishment for crimes, fairness in transactions, paying proper respect to someone. Distributive justice is between the collective and individuals - this is care for the poor, police forces, etc. Individuals must also be careful to exercise justice with respect to the collective - we each have an individual responsibility to those around us to be a moral, upright human being in our personal lives, even when it is hidden from others. Justice can also be applied to interactions between collectives. Peoples are morally obligated to deal with each other squarely, to interact fairly, and to respect each other.
The most important aspect of justice, however, is the justice between each individual and God. We have to ensure that we pay the proper respects to God based on the reality of our relationship to Him. The precise details of what this implies change based on the level of God's revelation we have assented to, but being open to God's revelation in the first place is also part of this justice. At the lowest end, for those who have not been exposed to the Gospel, justice to God consists of following natural law and behaving morally towards ourselves and others, even if we do not offer explicit worship to God.
At the highest end, for those who have the fullness of faith in the Catholic Church, justice towards God includes everything previous, but also things that are explicitly revealed in the Catholic religion. This includes things such as thankfulness towards God for providing our salvation and proper respect and appreciation for all the gifts of religion. It also includes respecting our obligations to the Church, recognizing the Church's duties imposed upon us as a vicarious part of God's will.
Nicholas Gomez Davila said, "For God, there are only individuals". Carrying out justice towards God means justice in our relationships towards fellow man. Respecting the most fundamental, individual justice between man and God leads to all other forms of justice.