The market is searching for solutions to reduce emissions in the energy sector by increasing the consumer efficiency and flexibility and integrating renewable sources. Prosumers are suited to this role and are increasingly considered crucial to any such solution. Small-and-medium enterprises (SMEs) that need to upgrade their energy infrastructure, due to equipment obsolescence or external pressures to adopt greener technologies, face difficulties in integrating new energy management strategies given the investment required and the payback periods. Industrial SMEs traditionally seek to make on-off investments with fast returns, exploiting the obtained equipment for its whole lifetime. Therefore, this paper presents a novel methodology to determine the optimal sizing and operation of the energy infrastructure for an industrial SME transitioning to a prosumer model to improve its economic perspectives, considering the exploitation of the infrastructure for its complete lifetime. The energy and economic profiles of SMEs are analysed and their energy infrastructure modelled in order to define the sizing and operation optimisation problem. Operation of the equipment is optimised considering weekly cycles along multiple years, obtaining the net present value of the investment. The proposed methodology, which employs direct search and linear programming techniques, enable industrial SMEs to undertake informed energy investment actions. A real manufacturing plant is described, characterized and used as the basis for a case study. The results show the economic feasibility of installing new energy equipment in SMEs, obtaining payback periods less than five years and final investment value of more than ten times the initial expense.