Nowadays, intelligent systems play an important role in a wide range of applications, including financial ones, smart cities, healthcare, and transportation. Most of the intelligent systems are composed of prefabricated components. Inappropriate composition of components may lead to unsafe, power-consuming, and vulnerable intelligent systems. Although artificial intelligence-based systems can provide various advantages for humanity, they have several dark sides that can affect our lives. Some terms, such as security, trust, privacy, safety, and fairness, relate to the dark sides of artificial intelligence, which may be inherent to the intelligent systems. Existing solutions either focus on solving a specific problem or consider the some other challenge without addressing the fundamental issues of artificial intelligence. In other words, there is no general framework to conduct a component selection process while considering the dark sides in the literature. Hence, in this paper, we proposed a new framework for the component selection of intelligent systems while considering the dark sides of artificial intelligence. This framework consists of four phases, namely, component analyzing, extracting criteria and weighting, formulating the problem as multiple knapsacks, and finding components. To the best of our knowledge, this is the first component selection framework to deal with the dark sides of artificial intelligence. We also developed a case study for the component selection issue in autonomous vehicles to demonstrate the application of the proposed framework. Six components along with four criteria (i.e., energy consumption, security, privacy, and complexity) were analyzed and weighted by experts via analytic hierarchy process (AHP) method. The results clearly show that the appropriate composition of components was selected through the proposed framework for the desired functions.