Component adaptation is widely recognised to be one of the crucial problems in Component-Based Software Engineering. The objective of this paper is to set a formal foundation for the adaptation of heterogeneous components that present mismatching interaction behaviour. The proposed adaptation methodology relies on: (1) the inclusion of behavioural types in component interfaces, to describe the interaction behaviour of components, (2) a simple high-level notation for adaptor specification, to express the intended connection between component interfaces, and (3) a formal definition of adaptor, a component-in-the-middle capable of making two components interoperate successfully according to a given specification.