Dharma is righteousness. Artha is wealth and Kama is fulfillment of desire. Dharma should be the basis for Artha and Kama. Both Artha and Kama stand for how a righteous man should contribute to his society and mankind in general.