The electrosurgical pencil (100) is adapted to receive an electrode (1) controllable by an electrical signal for performing surgical operations and includes a housing (4567), a circuit (2), and switching means (3, 71) to be activated from outside the housing (4567) for closing the circuit (2). The housing (4567) comprises receiving means (41) for receiving the electrode (1). The circuit (2) is a flexible circuit (2) and is positioned such that it is in direct contact with the electrode (1), when the electrode (1) is positioned in the receiving means (41).