From The Catechism of Catholic Ethics (n. 207)
“Theft is narrowly defined as the direct and voluntary deprivation of goods owned by another person. Love of God and neighbor requires us to respect the right of our neighbor to own property. Under this definition, theft is intrinsically evil.
“A broader definition of theft allows further classification, by intention and circumstances, into various types of theft, such as embezzlement, fraud, theft of intellectual property, etc. These acts are intrinsically evil, since they are types of theft, even though the type is determined by intention or circumstances, because the second font has an evil moral object.
“Expropriation may seem to resemble theft, and in fact may be theft under a dictionary definition, or under a legal definition. But under a proper moral definition, expropriation is not theft because God is the First Owner of all goods. So if one person has an abundance of food, and other persons have no other reasonable way to obtain enough food to live, except by taking that person’s food without his consent, then the act of taking the food (or other necessities of life) is not theft, and is not intrinsically evil. The right of ownership of any goods is first to God, who does not will that some persons starve, or are continually malnourished, when there is ample food available. God wills that the goods of this life be shared by all human persons, at least to the extent that any dire need can be met by what is available, but not to such an extent that no one may have true ownership of goods. The ownership of goods by human persons is good and moral because it is a reflection of the ownership of all Creation by God.
“But even when the act itself is certainly expropriation, which has the good moral object of distributing the goods of creation to those in dire need, the overall act is only moral if all three fonts are good. And so expropriation with a bad intention, or when the bad circumstances outweigh the good, would not be moral. Neither is it moral to commit an intrinsically evil act, such as killing the innocent, or assaulting the innocent, in order to accomplish the expropriation.”