> ## Documentation Index
> Fetch the complete documentation index at: https://www.canva.dev/docs/print-partnerships/llms.txt
> Use this file to discover all available pages before exploring further.
# Initialize the Partnership SDK
The Partnership SDK is a JavaScript library for developing the frontend of a Print Partnership integration.
You can use the Partnership SDK to:
* Embed Canva's product catalog in a web page.
* Embed the Canva editor in a web page.
* Control what happens when a user interacts with the catalog or editor.
This part of the tutorial explains how to initialize the Partnership SDK.
## Step 1: Render a home page
In the `src/views` directory, create an `index.ejs` file:
```html
Print Partnership Example
```
This file is the integration's home page.
**Tip:** If you're using the China version of the SDK, replace `https://sdk.canva.com/partnership.js` with `https://sdk.canva.cn/partnership.js`.
Next, create a route in the `server.js` file:
```javascript
app.get("/", async (request, response) => {
response.render("index", { partnerApiKey: process.env.PARTNER_API_KEY });
});
```
This route should:
* Render the "index" template when users visit the root path.
* Pass the [Partner API key](https://www.canva.dev/docs/print-partnerships/concepts/credentials/#partner-api-key) into the template.
With this code in place, [http://localhost:3000](http://localhost:3000) renders an empty page.
**Tip:** The Partner API key is *not* a sensitive value. Even so, load it via an environment variable to make it easier to switch between test and production credentials.
## Step 2: Embed the Partnership SDK
In the `index.ejs` file, copy the following code before the closing `body` tag:
```html
```
To verify that the SDK is loading, log the `Canva.Partnership` object to the JavaScript Console:
```javascript
console.log(Canva.Partnership);
```
Then refresh the page.
## Step 3: Initialize the SDK
To initialize the SDK, call the `initialize` method:
```html
```
This method expects an object with an `apiKey` property. This property must contain the integration's Partner API key:
```javascript
(async () => {
const api = await Canva.Partnership.initialize({
apiKey: "<%= partnerApiKey %>",
});
})();
```
`<%= partnerApiKey %>` is the EJS syntax for outputting a value. In this case, it outputs the value of the `partnerApiKey` variable that's passed it from the route.
After making this change, refresh the browser and open the JavaScript Console. If there's no errors, the SDK is initialized.
**Tip:** The examples in this documentation use the async/await syntax for asynchronous functions, which isn't supported in all browsers. In a production environment, we recommend using [Babel](https://babeljs.io/) or [TypeScript](https://www.typescriptlang.org/) to ensure maximum compatibility.
## Example
### src/views/index.ejs
```html
Print Partnership Example
```
### src/server.js
```javascript
require("dotenv").config();
const express = require("express");
const app = express();
app.set("views", "./src/views");
app.set("view engine", "ejs");
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.get("/", async (request, response) => {
response.render("index", { partnerApiKey: process.env.PARTNER_API_KEY });
});
app.listen(process.env.PORT || 3000);
```