Attachment arises only when causes and conditions ripen to bring a subject and an object together. To feel greed, I must become aware of something I want. Yet both subject and object constantly change, and therefore they have no lasting reality. The subject, or self, changes constantly, and the objects of desire change constantly as well. If I become lustful over a woman, I may do something with consequences. On the other hand, if I realize that the object of my attraction changes constantly, I may not give in to desire. I change, she changes, my lust changes. None of it has enduring reality.
So, we must practice contemplating the emptiness of fundamental ignorance. If we successfully do so, it will not arise. What arises, however is not fundamental ignorance but affliction; if we do away with afflictions, fundamental ignorance will cease to exist—we will experience no-self.
Contemplating Action
If you can deeply contemplate fundamental ignorance, the rest is easy. The second link refers to actions of body and mind, which occur in response to karmic retribution. While contemplating action, place your emphasis on the attachments that lead you to act with desire, aversion, anger, arrogance, jealousy, or doubt. Causes and consequences have concordant qualities and natures; an unwholesome thought can lead to an unwholesome act. If you can act without engaging these mental afflictions, your actions will not create unwholesome karma; otherwise, suffering inevitably follows.