Effective planning involves knowing where different actions will take us. However natural environments are rich and complex, leading to an exponential increase in memory demand as a plan grows in depth. One potential solution to this problem is to share the neural state transition functions used for planning between similar contexts. Here, we asked human participants to perform a sequential decision making task designed so that knowledge could be shared between some contexts but not others. Computational modelling showed that participants shared a model of state transitions between contexts where appropriate. fMRI data identified the medial temporal lobe as a locus for learning of state transitions, and within the same region, correlated BOLD patterns were observed in contexts where state transition information were shared. Finally, we show that the transition model is updated more strongly following the receipt of positive compared to negative outcomes, a finding that challenges conventional theories of planning which assume knowledge about our environment is updated independently of outcomes received. Together, these findings propose a computational and neural account of how information relevant for planning can be shared between contexts.